How to add black isolines for f(x,y) = -1, 0, 1

4 ビュー (過去 30 日間)
Faraz Ali
Faraz Ali 2021 年 9 月 15 日
コメント済み: Faraz Ali 2021 年 9 月 16 日
Hi ,
I have f(x,y) and I want to add black isolines for f(x,y) = -1, 0, 1. How can I do it?
Thanks

回答 (1 件)

Steven Lord
Steven Lord 2021 年 9 月 15 日
Use the contour or contour3 functions.
  3 件のコメント
Steven Lord
Steven Lord 2021 年 9 月 15 日
[x, y, z] = peaks;
surf(x, y, z)
shading interp
hold on
contour3(x, y, z, [-1, 0, 1], 'k')
Faraz Ali
Faraz Ali 2021 年 9 月 16 日
Is the default color of isolines black ?
I have f(x,y) = sinx+cosy ( for example). I have to assign f(x,y) to "z" variable for contour? Does it work in the same way for adding black isolines?

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

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by