Problem when plotting a graph after for and if else if
Mostrar comentarios más antiguos
--------------------------
C = 100;
g = 20;
s = 0.5;
T = 1;
t = 0.68;
x = 0:0.1:1
if x <t
d = 32/(1.-x*0.2)
else d = C*(1-g/C)^2./(2*(1.-x*g/C))+900*T*((x-1.)+sqrt((x-1).^2+12*C*(x-t)./(T*s*g*3600)))
end
plot(x,d)
-----------------------
Anyone help me. I dont understant why d(x=0)=21.64.
while: d(x=0<0.68)=32*(1-0)=32
Please explain help me why?
Thanks so much!
1 comentario
Le Duc Long
el 9 de Jun. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!