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 ExchangeGet 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