x = -1.0:0.2:1.0;
y = -2:0.25:3;
length_x = length(x);
length_y = length(y);
for nx=1:length_x
for ny=1:length_y
result(nx, ny) = exp(x(nx)^2-y(ny)^2);
end
end

 채택된 답변

KSSV
KSSV 2021년 2월 15일

0 개 추천

x = -1.0:0.2:1.0;
y = -2:0.25:3;
[X,Y] = meshgrid(x,y) ;
result = exp(X.^2-Y.^2);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 2월 15일

답변:

2021년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by