Plotting in 3d

16 ビュー (過去 30 日間)
Zilla Tofte
Zilla Tofte 2020 年 7 月 31 日
コメント済み: madhan ravi 2020 年 7 月 31 日
How do I plot z=1/sqrt(x^2+y^2) in Matlab?

回答 (2 件)

madhan ravi
madhan ravi 2020 年 7 月 31 日

Alexander
Alexander 2020 年 7 月 31 日
x = 1:0.1:10;
y = 1:0.1:10;
[X,Y] = meshgrid(x,y);
Z=1./sqrt(X.^2+Y.^2);
imagesc(x,y,Z)
  4 件のコメント
Alexander
Alexander 2020 年 7 月 31 日
as an example, I plotted x/y in 1 to 10 range. You can substitute with whatever ranges you need. "0.1" is the step for x/y variables. x = 1:0.1:10 creates a vector of number [1 1.1 1.2 ..... 9.9 10].
madhan ravi
madhan ravi 2020 年 7 月 31 日
surf() instead of imagesc()

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by