Plotting a Surface with ezsurf in MATLAB

  • Thread starter Thread starter lmannoia
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion centers on plotting a surface in MATLAB using the ezsurf function for the equation f(x,y) = y * e^(-x^2 - y^2). The user initially attempts to use the syntax ezsurf('y*e^(-x^2+y^2)') but encounters errors. The solution provided clarifies that the correct MATLAB function for the exponential is exp(), leading to the successful plotting of the surface.

PREREQUISITES
  • Familiarity with MATLAB syntax and functions
  • Understanding of exponential functions in mathematics
  • Knowledge of surface plotting techniques in MATLAB
  • Basic calculus concepts, particularly involving multivariable functions
NEXT STEPS
  • Learn how to use the MATLAB exp() function for exponential calculations
  • Explore advanced surface plotting techniques in MATLAB
  • Investigate the use of symbolic variables in MATLAB with syms
  • Study error handling and debugging in MATLAB scripts
USEFUL FOR

Students in calculus courses, MATLAB users seeking to enhance their plotting skills, and anyone interested in visualizing multivariable functions.

lmannoia
Messages
30
Reaction score
0

Homework Statement


For a project for my calc 3 class, we have a small MATLAB assignment. The one question I can't plot is the surface (using ezsurf) f(x,y)=ye^-(x^2+y^2)


Homework Equations


i've tried ezsurf('y*e^(-x^2+y^2)') with syms x y and even syms x y e
I also tried ezsurf('y*e^-x^2-y^2')
Matlab tells me there are errors. What am I doing wrong?
Thanks in advance for the help!


The Attempt at a Solution

 
Physics news on Phys.org
Is 'e' in your equation is the exponential?
if it is so then you have to use the Matlab function exp()
 
worked perfectly; thanks so much!
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
1K