I'm trying to plot a function with ez plot where my variable x is a symbolic object and I would like to make the boundaries of my plot symbolic objects also. I'm new to matlab

4 views (last 30 days)
syms c l u x
f =
(c+1)^3*x^5-3*(c+1)^4*x^4+((c+1)^2*l+u+3*(c+1)^5)*x^3-(2*(c+1)^3*l+(3*c+3)*u+(c+1)^6)*x^2+(3*(c+1)^2*u+(c+1)^4*l)*x
this is my function and when I try to plot it using ezplot
this is what I get: ezplot(f) ??? Error using ==> char Cell elements must be character arrays.
Error in ==> ezplot at 158 fmsg = char(f);
Error in ==> sym.ezplot at 46 h = ezplot(f.s);
I don't understand what this means. Can someone help me plot this function please

Answers (1)

Walter Roberson
Walter Roberson on 8 Jul 2015
The boundaries for ezplot and related functions cannot be symbolic; they must be numeric values. You can plot with numeric values and change the xticklabel and yticklabel to show symbols.

Tags

Community Treasure Hunt

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

Start Hunting!