How to plot two different symbolic functions on the same figure?

I need to know how to plot two different symbolic functions on the same figure. The variable is x. In the 1st function x ranges from 0 to 0.9 and in the 2nd function x ranges from 0.9 to 1.8
I tried using the "hold" command in between two "ezplot" commands. but that didn't work. Maybe because the x range is different.

1 commentaire

Joshua
Joshua le 3 Mar 2017
Modifié(e) : Joshua le 3 Mar 2017
Try using fplot where I randomly chose f1 and f2:
syms x;
f1=symfun(x,x);
f2=symfun(x^2,x);
fplot(f1,[0,0.9]);
hold on;
fplot(f2,[0.9,1.8]);

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by