フィルターのクリア

What command should I write if I want to use the value in the multidimensional array?

3 ビュー (過去 30 日間)
I have a command for multidimensional array which is as below:
% creating a multidimensional array
files = dir('*txt') ; % you are in the folder with text files
N = length(files) ;
names = {files(:).name}' ;
iwant = cell(N,1) ;
for i = 1:N
iwant{i} = importdata(files(i).name) ;
end
What commmand should I write if I want to use the all row and first column value from the multidimensional array?
Thank you!
  2 件のコメント
Walter Roberson
Walter Roberson 2018 年 7 月 11 日
You are not creating a multidimensional array with that code. You are saving the results of each importdata() into a cell array. You would need to access some part of the result of the importdata() call to get to the data to put it into a multidimensional array.
These days I recommend readtable() instead of importdata() for many files; importdata() is somewhat wonky as to what it does or does not return.
Mohamad Khairul Ikhwan Zulkarnain
Mohamad Khairul Ikhwan Zulkarnain 2018 年 7 月 11 日
What is the exact code for me to create a multidimensional array for the element below?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by