How to plot amplitude values of a matrix (dimension 651 by 10) with colorcode

3 ビュー (過去 30 日間)
AS
AS 2022 年 11 月 28 日
コメント済み: Voss 2022 年 11 月 30 日
I have amplitude values of a matrix with dimension 651*10. Also, I have the cluster number for this matrix with 1 to 5. I want to plot these Cluter number with specific color like 1 is green, 2 is black, 3 is cyan, 4 is red, 5 is white with its amplitude values. Means this amplitude values will be clustered by this mentioned colocode. How to plot this. Please, help me with useful information. thanks
  3 件のコメント
AS
AS 2022 年 11 月 30 日
Yes. But unable to do.
Voss
Voss 2022 年 11 月 30 日
@AS: "what will be the corresponding x values for the plots?" In other words, you want to plot amplitude vs ____ ?

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

回答 (1 件)

Voss
Voss 2022 年 11 月 30 日
How about this?
load('amp.mat')
load('cluster.mat')
colors = 'gkcrw';
for ii = 1:5
idx = find(cluster == ii);
plot(idx,amp(idx),[colors(ii) '.']);
hold on
end
set(gca(),'Color','y');

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by