How to plot a piece-wise function using FPLOT
Mostra commenti meno recenti
Hello Please state if possible, how to use fplot to have the graph of a piecewise function. Actually the code below is exactly according to the matlab page: https://uk.mathworks.com/help/matlab/ref/fplot.html
fplot(@(x) exp(x),[-3 0],'b')
hold on
fplot(@(x) cos(x),[0 3],'b')
hold off
grid on
But, it does not work for me. The code plots only the second function, cos(x). Please help me if possible.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Line 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!