How can I plot the graph?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Behzad Eydiyoon
il 16 Set 2021
function output = carFunc(x)
x=0:0.1:75;
if (x >= 75)
output = 25;
else
output = x/3;
end
plot(x,output)
end
Categorie
Scopri di più su Log Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
