I do not know why this is not plotting the multivariable function correctly?
이전 댓글 표시
It do not know why MATLAB plots incorrectly the following function f(x,y) = x*(10y+3)*e^(-x^2-y^2)
This is the code I wrote:
x = -5:0.1:5;
y = -5:0.1:5;
[X,Y]=meshgrid(x);
syms x y;
f(x,y) = exp(-x.^2)*exp(-y.^2)*x*(10*y+3);
F = X*(10*Y+3)*(exp(-X.^2-Y.^2));
surf(X,Y,F);
f = (exp(-x.^2-y.^2))*(10*y*x+3*x); % This is not part of the question
set(gca,'FontSize',15)
xlabel('$x$','FontSize',20,'interpreter','latex');
ylabel('$y$','FontSize',20,'interpreter','latex');
title('$x*(10*y+3)*exp(-x^2-y^2)$','FontSize',15,'interpreter','latex');
And this is the output I got

Any ideas?
채택된 답변
추가 답변 (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!