plot of 2D-Matrix, frequency/duration

1 回表示 (過去 30 日間)
Olli
Olli 2011 年 10 月 2 日
Hi all, I have matrix showing how long a electrcal device was working at a certain current and a certain temperature in SECONDS, e.g.
ans =
1.0e+004 *
0 0 0 0 0
0.0060 0.0268 0.1049 0.1551 0
0.1889 0.0697 1.2819 0.5237 0
0.0229 0.0254 0.1810 0.2097 0
0 0 0 0 0
and you can define the columns (x-Axis) as Voltage: ans =
270 285 315 345 360
and the rows (y-Axis) as Temperature
ans =
20
25
35
45
50
Do you know any possibility how to show those duration graphically? One possibility could be to have a matrix of points and the size of the points to be dependant of the values, but I don't know how to do this.
Thanks a lot for your help! Oli

採用された回答

Daniel Shub
Daniel Shub 2011 年 10 月 2 日
Something like:
[x, y] = meshgrid(1:5, 1:5);
z = 20*rand(5, 5);
scatter(x(:), y(:), z(:))

その他の回答 (2 件)

Image Analyst
Image Analyst 2011 年 10 月 2 日
Try calling plot() first (to get lines between the points if you want that), and then call "hold on" and scatter() after that. Scatter() take an argument where you can specify the marker sizes.

Olli
Olli 2011 年 10 月 2 日
Yep, that's brilliant. Thanks a lot!

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by