2 variable surface plot with isoline

17 ビュー (過去 30 日間)
Emmanouil Karamousadakis
Emmanouil Karamousadakis 2021 年 9 月 3 日
Hello, my question is if there is a way to put an isoline on an existing surface plot.
For example I have this surface plot
fsurf(@(x1,x2) sin(x1)^2 -0.2*x1*x2,[0 6]) (please rotate the view for better understanding)
Now, on this surface, I want to add a black line where the following plane intersects (hopefully I make sense)
hold on
fsurf(@(x1,x2) sin(x1)^2 -0.2*x1*x2==0,[0 6])
But I do not need the whole plane added.
Any ideas please?
  1 件のコメント
Emmanouil Karamousadakis
Emmanouil Karamousadakis 2021 年 9 月 5 日
Thank you!
Looks great!

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

採用された回答

Chunru
Chunru 2021 年 9 月 3 日
[x, y] = meshgrid(0:.1:6, 0:.1:6);
z = sin(x).^2 -0.2*x.*y;
s = surfl(x, y, z);
s.EdgeColor = 'none';
view(-120, 30)
hold on
contour3(x, y, z, [0 0], 'r-')

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by