Info

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

Is there any other way i could make a graph look like a straight line other than changing the limits on the axes by trial and error method?

1 回表示 (過去 30 日間)
Suman Koirala
Suman Koirala 2013 年 4 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have been asked to get a straight line looking graph for all 4 subplots which I have and they are basically volume vs radius vs area of a sphere. I kind of have it but I was wondering if there's any other way to find it other than manipulating the axes?
this is my program:
r1=[0.1:0.1:100];
A1=4*pi*r1.^2;
V1=(4/3)*pi*r1.^3;
r2=[1:0.1:10000];
A2=4*pi*r2.^2;
V2=(4/3)*pi*r2.^3;
subplot(2,2,1)
plot(V1,r1), xlabel('V'), ylabel('r'), axis([5 50 0 10])
subplot(2,2,2)
plot(A1,r1), xlabel('A'), ylabel('r'), axis([5 50 0 10])
subplot(2,2,3)
plot(V2, A2), xlabel('V'), ylabel('A'), axis([10 100 0 100])
subplot(2,2,4)
plot(r2, A2), xlabel('r'), ylabel('A'), axis([0 50 0 200])
Thanks for the feedback.

回答 (0 件)

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

Community Treasure Hunt

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

Start Hunting!

Translated by