Need help shrinking axis'

15 visualizaciones (últimos 30 días)
Bobby Punjabi
Bobby Punjabi el 22 de Sept. de 2017
Comentada: Rena Berman el 28 de Sept. de 2017
Hey Guys!
I need help to shrink my axis so the y axis goes up by 0.2 and is limited at 2.0. It also needs to start at 0.4 (Being the (0,0) location). For example it will start at 0.4, then 0.6, then ..... and last 1.8
with the x axis I need the line to keep going towards 25 and not stop at 20. Thanks so much, I am not sure how to fix these up
i = 1;
width = 0.1;
depth = 0;
d= 0;
while width<20
a(i)=sqrt(1+400/(width(i).^2));
d(i)=(8.050*(width(i).^2)/40*(acosh(a(i))+a(i)*sinh(acosh(a(i))))*0.01*3*sqrt(5)/(width(i))).^(2/3);
width(i+1)= width(i)+0.1;
depth = d(i);
i = i+1;
end
ylabel('Depth of Immersed Ship(m)')
xlabel('Width of Ship(m)')
title('Depth of immersed ship vs ship width')
plot(width(2:end),d)
  1 comentario
Rena Berman
Rena Berman el 28 de Sept. de 2017
(Answers Dev) Restored edit

Iniciar sesión para comentar.

Respuestas (2)

KL
KL el 22 de Sept. de 2017

Star Strider
Star Strider el 22 de Sept. de 2017
Try this:
i = 1;
width = 0.1;
depth = 0;
d= 0;
while width<20
a(i)=sqrt(1+400/(width(i).^2));
d(i)=(8.050*(width(i).^2)/40*(acosh(a(i))+a(i)*sinh(acosh(a(i))))*0.01*3*sqrt(5)/(width(i))).^(2/3);
width(i+1)= width(i)+0.1;
depth = d(i);
i = i+1;
end
figure(1)
plot(width(2:end),d)
axis([0 25 0.4 2.0])
set(gca, 'YTick', 0.4:0.2:2)
ylabel('Depth of Immersed Ship(m)')
xlabel('Width of Ship(m)')
title('Depth of immersed ship vs ship width')

Categorías

Más información sobre White en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by