I can't graph multivariable function that contains cos function doens't work
이전 댓글 표시
I'm trying to graph f(x,y)=(e^x )* cos(y)
By using ulframalpha, I found that the graph should look like this.

>> x=[-4*pi:0.1:4*pi];
>> y=[-4*pi:0.1:4*pi];
>> [X,Y]=meshgrid(x,y);
>> Z=exp(X)*cos(Y);
>> surf(X,Y,Z)
My code look like this, and the result keep shows me this, flat plane.

I changed range for several times, but I don't think that range is not problem.
Can you see any problem in my code?
Any help would be aprreciated.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!