How to plot contour?
이전 댓글 표시
Have 3 random variables, but need to plot in two dimensions.
Here is the function.
f=1+2*r1*cos(omega)+2*r2*cos(2*omega).
X axis: r1 [-1,1]
Y axis: r2 [-1,1]
Plot the contour which makes f>=0 for all omegas. In other words, plot the contour which makes the minimum value of f is 0.
Apparently, (-0.5,0), (0.5,0), (0,0.5), (0,-0.5) are four points on the contour.
Thanks in advance.
댓글 수: 3
Walter Roberson
2012년 6월 14일
You are only plotting against r1 and r2: since f>=0 for all omega there is no point plotting the values of omega, just whether f>=0 for all (r1,r2,:) locations.
Xu
2012년 6월 15일
Walter Roberson
2012년 6월 15일
hints:
ndgrid()
bsxfun()
all()
contour()
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!