MATLAB ezplot Error: Get Help Here!

  • Context: MATLAB 
  • Thread starter Thread starter Pepealej
  • Start date Start date
  • Tags Tags
    Error Matlab
Click For Summary
SUMMARY

The forum discussion addresses an error encountered in MATLAB while using the ezplot function. The user reported an issue with the error message "Too many sym objects to plot" when attempting to plot the equations derived from a symbolic solution. The solution involved ensuring that the variables passed to ezplot were properly defined and that the range for plotting was correctly specified. This resolved the issue and allowed for successful plotting of the equations.

PREREQUISITES
  • Familiarity with MATLAB syntax and functions
  • Understanding of symbolic mathematics in MATLAB
  • Knowledge of the ezplot function and its requirements
  • Basic understanding of plotting ranges in MATLAB
NEXT STEPS
  • Review MATLAB documentation on ezplot for detailed usage guidelines
  • Explore symbolic computation in MATLAB, focusing on the solve function
  • Learn about error handling in MATLAB scripts to troubleshoot common issues
  • Investigate alternative plotting functions in MATLAB, such as fplot and plot
USEFUL FOR

This discussion is beneficial for MATLAB users, particularly those working with symbolic mathematics and plotting functions, as well as educators and students seeking to troubleshoot common MATLAB errors.

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

  • · Replies 1 ·
Replies
1
Views
4K
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
5K