Reading datasets by FOR loop!
1 回表示 (過去 30 日間)
古いコメントを表示
Hey Matlab users,
I would like to have import a series of data sets and then using FOR loop or any other ways take each of data sets for the rest of program. For example:
dataset_1
dataset_2
dataset_3
dataset_4
for i = 1:4
(Qestion: how can I use each of above datasets separately???);
end
Thanks in advance, Mehdi
1 件のコメント
回答 (1 件)
Fangjun Jiang
2011 年 9 月 22 日
I think this question has been asked many times. Don't name your variable as dataset_1, dataset_2, ... Now you saw the difficulty of using them in a for-loop. See 'How can I create variables A1, A2,...,A10 in a loop?" in this link. http://matlab.wikia.com/wiki/FAQ
The short answer is to use array dataset(4) so that you can call it in the for-loop as dataset(i).
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!