Plot region bounded above by the paraboloid z = x2 + y2 and below by the triangle enclosed by the lines y = x, x=0, and x + y =2,

6 件のコメント

Walter Roberson
Walter Roberson 2021 年 2 月 9 日
Symbolic toolbox and piecewise() and fsurf()
JIANGWEN DONG
JIANGWEN DONG 2021 年 2 月 9 日
Can you tell me how do write the code, please?
[x,y] = meshgrid(linspace(-2,2));
z = x.^2+y.^2;
mesh(x,y,z)
hold on;
I only work this out.
Walter Roberson
Walter Roberson 2021 年 2 月 9 日
[x,y] = meshgrid(linspace(-2,2));
z = x.^2+y.^2;
z(x + y > 2) = nan;
mesh(x,y,z)
Except you would insert more statements setting selected z locations to nan.
JIANGWEN DONG
JIANGWEN DONG 2021 年 2 月 9 日
oh thank you very much!
What about the other two lines?
Walter Roberson
Walter Roberson 2021 年 2 月 9 日
you would insert more statements similar to
z(x + y > 2) = nan;
JIANGWEN DONG
JIANGWEN DONG 2021 年 2 月 9 日
OK
thank you very much!

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

回答 (0 件)

カテゴリ

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

タグ

質問済み:

2021 年 2 月 9 日

コメント済み:

2021 年 2 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by