how to extract a part of a table using logical indexing and plot a scatter figure
21 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody
I already ask a similar question and didn't get any answer. I am going to ask it in a different manner, hope to get some advice.
I have the duration_time.xlsx file.
I need to group he information inside it and plot with different mark and colors.
like
all the dips of 90 must be blue
all the dips of 60 must be red
all the dips of 45 must be green
types which end to "_s" must be circle
types with no "_s" must be star
I think I should make new tables and then use "hold on" to impose all on one figure.
how can I pick all the rows that their first colmn is "90"
T = readtable('duration_time.xlsx',...
'Range','A1:N16',...
'ReadVariableNames',true)
A=T.dip==90;
....
I would appreciate any help.
0 件のコメント
回答 (1 件)
Mohammad Sami
2019 年 11 月 1 日
編集済み: Mohammad Sami
2019 年 11 月 1 日
You are on the right track. You just need to use the indexing as normal.
You can check the plot documentation for the color, marker style e.t.c.
idx_90 = T.dip == 90;
T90 = T(idx_90,:);
f = figure;
hold on;
plot(T90.abc,T90.xyz) % use the variables you want to plot, specify the color and marker, check doc plot
% the rest of your indexing and plots.....
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!