Plot data from text file
1 回表示 (過去 30 日間)
古いコメントを表示
I want to plot ReP^2+ImP^2 as function of numero = 5, 10, 15 …145 for each mode(m,n) I would like to have something like this with the name of the mode on each curve. Here is the beginning of my code, anyone can help ?
data = readfile(test.txt)
HeaderLines = 8;
for i=(HeaderLines+1):numel(tm)
%store in temp variable
if isempty(data{i}),continue,end
str=data{i};
line = str2num(str);
....
You can find my file attached.
Thank you in advance,
5 件のコメント
Rik
2020 年 9 月 23 日
You should convert the entire file. That means you will have a vector m with 5145 elements. Then you can use unique and use the result for a for loop, in which you can use ismember to extract all positions where m has a specific value.
You can also use that line to extract the values of m and n you need to combine.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!