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 Kommentar

Joshua
Joshua am 3 Mär. 2017
Bearbeitet: Joshua am 3 Mär. 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]);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Bearbeitet:

am 3 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by