[matlab] something wrong with my code

  • Context: MATLAB 
  • Thread starter Thread starter Ann_Hope
  • Start date Start date
  • Tags Tags
    Code Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
Ann_Hope
Messages
2
Reaction score
0
Hi all
I'm new to matlab/scilab. I want to draw a 3D surface using z = cos(x+y)*cos(3x-y)+cos(x-y)*sin(x+3y)+5e^(x2+y2)/8

I typed "Z=cos(x+y)*cos(3*x-y)+cos(x-y)*sin(x+3*y)+5*exp(-(x.^2+y.^2)/8);" into matlab, but is says "Inconsistent multiplication".

I would appreciate anyone who could help me check the problem and give me an advice.

Thanks all!
 
Physics news on Phys.org