Plotting Vector Field for F(x,y,z) = (x+y+z)/(x​^2+y^2+z^2​)^1.5

clear all
[x, y, z] = meshgrid(-50:1:50,-50:1:50,-50:1:50);
i = 1/(x.^2+y.^2+z.^2).^(3/2);
j = 1/(x.^2+y.^2+z.^2).^(3/2);
k = 1/(x.^2+y.^2+z.^2).^(3/2);
quiver3(x,y,z,i,j,k)
Could anyone tell me where is the issue, nothing show up in the figure but no error founded.

 採用された回答

Walter Roberson
Walter Roberson 2023 年 11 月 24 日
移動済み: Walter Roberson 2023 年 11 月 24 日

0 投票

clear all
[x, y, z] = meshgrid(-50:1:50,-50:1:50,-50:1:50);
i = 1/(x.^2+y.^2+z.^2).^(3/2);
j = 1/(x.^2+y.^2+z.^2).^(3/2);
k = 1/(x.^2+y.^2+z.^2).^(3/2);
i(~isfinite(i)) = nan;
j(~isfinite(j)) = nan;
k(~isfinite(k)) = nan;
quiver3(x,y,z,i,j,k)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVector Fields についてさらに検索

製品

リリース

R2023b

質問済み:

Bo
2023 年 11 月 24 日

移動済み:

2023 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by