フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Matlab 3 variable plot

2 ビュー (過去 30 日間)
Ben
Ben 2020 年 8 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi all I am looking to produce a plot similar to that shown below. I have some water speed data that is measured at different depths on different days.
The water speeds are stored in a 15 by 10 matrix called speeds. I would like to plot each column in that matrix against the values in WaterDepth (which would be on the Y axis as shown in the graph above). On the x axis I would like to have Time (which corresponds to each of the columns in Speeds). I would like the speeds to be different colours as shown in the example image.
The setup is as follows.
Speeds=randn(15,10);
Time = [1:1:10];
WaterDepth = [0.5:0.5:7.5].';
Any advice on the best way this can be done?
  2 件のコメント
Adam Danz
Adam Danz 2020 年 8 月 28 日
編集済み: Adam Danz 2020 年 8 月 28 日
Check out imagesc(x,y,C)
Another option is heatmap(xvalues,yvalues,cdata) which has several additional features but is much less customizable than imagesc.
If those specific colors are desired, the cool colormap is fairly close.
Ben
Ben 2020 年 8 月 28 日
Thanks I was orignally using pcolor but imagesc does a better job for sure.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by