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

4 views (last 30 days)
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 Comment
Joshua
Joshua on 3 Mar 2017
Edited: Joshua on 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]);

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!