MATLAB MATLAB ezplot Error: Get Help Here!

  • Thread starter Thread starter Pepealej
  • Start date Start date
  • Tags Tags
    Error Matlab
AI Thread Summary
The user encountered an error while using the ezplot function in Matlab, specifically receiving a message about having "too many sym objects to plot." The issue arose from the variables x and y being defined in terms of the symbolic variable theta, which led to complications when attempting to plot. The solution involved simplifying the expressions or ensuring that the variables passed to ezplot were not symbolic. The discussion concluded with the user's problem being resolved, indicating that the error was addressed effectively.
Pepealej
Messages
19
Reaction score
0
Hi. I was writing the simplest code ever in Matlab when I got an error using the ezplot function. I wrote this script:

syms z t;
eq=2600*tan(z)-0.5*9.81*2600^2*(210*cos(z))^(-2)-350;
theta=solve(eq, 'Real', true);
x=210*cos(theta);
y=210*sin(theta)*t-0.5*9.81*t^2;
max=2600*(210*cos(theta))^(-1);
ezplot(x,y,[0 max]); <--- I get problems here.

I get problems in the ezplot. It says:

Error using sym/ezplot>checkNoSyms (line 89)
Too many sym objects to plot.

Error in sym/ezplot (line 68)
checkNoSyms(varargin(2));

Error in script_name (line 9)
ezplot(x,y,[0 max]);

¿Can anyone give me a hand? Thanks :)
 
Physics news on Phys.org
---solved---
 

Similar threads

Back
Top