How can I plot the graph?
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Behzad Eydiyoon
am 16 Sep. 2021
function output = carFunc(x)
x=0:0.1:75;
if (x >= 75)
output = 25;
else
output = x/3;
end
plot(x,output)
end
Kategorien
Mehr zu Log Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
