How to access the maximum value of the radius in rose?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ali Y.
am 8 Mär. 2017
Kommentiert: Star Strider
am 14 Mär. 2017
Could someone help me to access to the value of the radius automatically plotted in any rose diagram? I have to say that I use Matlab 14b. Say, having the following code, how can I get the value 40?
load sunspot.dat
theta = sunspot(:,2);
figure (222)
rose(theta,12)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 8 Mär. 2017
Ask rose for two outputs. You can then plot it with polar.
The Code —
load sunspot.dat
theta = sunspot(:,2);
[t_out, r_out] = rose(theta,12);
[r_max, idx] = max(r_out) % Maximum Radius & Index
t_max = t_out(idx)*180/pi % Corresponding Angle
figure (222)
polar(t_out, r_out)
r_max =
38
idx =
30
t_max =
210
4 Kommentare
Star Strider
am 14 Mär. 2017
My pleasure.
The get function will work regardless of the version you are using. I thought R2014b (that introduced the new ‘Handle Graphics 2’) also introduced the structure syntax. My apologies.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!