hello ty for your attention
im a newcommer
i want a plot3 for this function but im confused and don't know what to do
z=y*exp(-x^2-y^2)
-3<=x,y<=3
I would be grateful if you guide me through this.

 채택된 답변

Image Analyst
Image Analyst 2022년 5월 30일

1 개 추천

Try meshgrid and linspace :
% -3<=x,y<=3
numElements = 200;
X = linspace(-3, 5, numElements);
Y = linspace(-3, 3, numElements);
[x, y] = meshgrid(X, Y);
z = y*exp(-x .^ 2 - y .^ 2);
surf(x, y, z, 'EdgeColor', 'none');
colorbar;

추가 답변 (0개)

카테고리

질문:

2022년 5월 30일

답변:

2022년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by