Plotting a Surface with ezsurf in MATLAB

  • Thread starter Thread starter lmannoia
  • Start date Start date
  • Tags Tags
    Matlab
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!
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top