Unrecognized function or variable 'X'.

fsurf(X,Y,exp(-2*x.^4+2*x.^2-x.y.^1-y.^2))
i try to plot but the system says:
>> matlabplot
Unrecognized function or variable 'X'.
Error in matlabplot (line 7)
fsurf(X,Y,exp(-2*x.^4+2*x.^2-x.y.^1-y.^2))

 采纳的回答

fun = @(x,y) exp(-2*x.^4+2*x.^2-x.*y.^1-y.^2) ;
fsurf(fun)

3 个评论

omg thank you so much!
do you maybe know how to make the x y a bit amaller? as in not use the default -5~5?
thank you!!!
Read about the function fsurf, there is an option to specify the intervel. Also you can generate the same using surf. Read about surf as well.

请先登录,再进行评论。

更多回答(0 个)

类别

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by