フィルターのクリア

how to plot f(x,y) = x^2/y, y>0

2 ビュー (過去 30 日間)
Jetty Rakesh Aditya
Jetty Rakesh Aditya 2021 年 3 月 24 日
回答済み: Jan 2021 年 3 月 24 日
how can i plot the above problem in matlab ?

採用された回答

Alan Stevens
Alan Stevens 2021 年 3 月 24 日
Set the range of values of x and y of interest, then use meshgrid and surf
doc meshgrid
doc surf
  2 件のコメント
Jetty Rakesh Aditya
Jetty Rakesh Aditya 2021 年 3 月 24 日
i am new to matlab. Can you kindly explain how to do it using mesh grid?
Jan
Jan 2021 年 3 月 24 日
Accepting an answer shows, that the problem is solved. Is it solved already?

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

その他の回答 (2 件)

DGM
DGM 2021 年 3 月 24 日
Perhaps an example will suffice.
% plot 2-x^2+y^2 for x=[-1,1], y=[-1,1]
x=linspace(-1,1,10);
y=linspace(-1,1,10);
[X Y]=meshgrid(x,y);
Z=2 - X.^2 + Y.^2;
surf(X,Y,Z)

Jan
Jan 2021 年 3 月 24 日
x = linspace(-10, 10, 100);
y = linspace(0, 10, 100).';
f = x .^ 2 ./ y;
surf(x, y, f)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by