How can I plot the graph?
Mostrar comentarios más antiguos
I want to plot the function where y=x/3 until y=25 where it is constant y=25
function output = carFunc(x)
if (x >= 75)
output = 25;
else
output = x/3;
end
plot(x,carFunc(x))
end
Respuesta aceptada
Más respuestas (1)
Behzad Eydiyoon
el 16 de Sept. de 2021
function output = carFunc(x)
x=0:0.1:75;
if (x >= 75)
output = 25;
else
output = x/3;
end
plot(x,output)
end
Categorías
Más información sobre Log Plots 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!
