How to plot below function of two variables

1 回表示 (過去 30 日間)
HEMANT K NASHINE
HEMANT K NASHINE 2019 年 8 月 15 日
編集済み: the cyclist 2019 年 8 月 15 日
  1 件のコメント
the cyclist
the cyclist 2019 年 8 月 15 日
It's unclear to me how to handle the case when x is in [0,1] but y is not.
However, my solution (which only covers the known cases) should give you what you need.

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

採用された回答

the cyclist
the cyclist 2019 年 8 月 15 日
編集済み: the cyclist 2019 年 8 月 15 日
x = 0 : 0.02 : 2; % 2 is not equal to infinity, but it shows the behavior.
y = 0 : 0.02 : 2;
[xx,yy] = meshgrid(x,y);
f = 3.*(xx<=1 & yy<=1) + exp(xx+yy).*(xx>1 & yy>1);
figure
h = mesh(xx,yy,f);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by