Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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?

2 Ansichten (letzte 30 Tage)
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.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by