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

조회 수: 5 (최근 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 CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by