Plot shows a negative graph

14 visualizaciones (últimos 30 días)
Abhinandana R
Abhinandana R el 24 de En. de 2019
Comentada: Abhinandana R el 24 de En. de 2019
hi, I need a positive exponential graph starting from zero. but it shows negative. what could I do now to get a positive exponential graph starting from zero? the coding is as follows,
u=0.02; i=22/7; g=800; l=2;
d=0.1; p=45; m=tand(p);
r=linspace(0,1,100);
a=(r-m*(d+l)).^5-((r-m*1).^5)
q=(i*g*a)./(40*u*m)
plot(r,q)

Respuesta aceptada

madhan ravi
madhan ravi el 24 de En. de 2019
Add the below two lines at the end of your code
xlim([-1 1]) % if you change the scale it is clear that it starts from zero
grid on
  3 comentarios
madhan ravi
madhan ravi el 24 de En. de 2019
plot(r,abs(q))
Abhinandana R
Abhinandana R el 24 de En. de 2019
thank you sir!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by