separating parts of loaded data
1 回表示 (過去 30 日間)
古いコメントを表示
I have loaded in data files which are doubles of variable size and each have an identifier xma567, xma568 etc. The size is either 1028x2 or 1028xn, with n being greater than 2. I would like to separate out the 1028xn files and add an offset to produce stacked plots. Any suggestions?
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 8 月 4 日
It is not recommended to use individual variables for that purpose.
http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F
After you load the data from any one file, you can use size() to check the number of columns, and add it to a cell array of data if it is one of the ones you want to keep. After you have loaded them all you can use the cell array to produce an appropriate plot.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!