Add line in combined surface-plot where surfaces cross

조회 수: 1 (최근 30일)
Björn
Björn 2012년 9월 17일
Using the hold function I plot two surfaces in a surface-plot:
surf(A,'linestyle','none')
hold on
surf(B,'linestyle','none')
hold off
Where A and B are two-dimensional matrices. I turned off the contour lines because I use a colormap with 512 colors, and then the graph will become black. Now since the two surfaces cross each other, I want to add a line of desired color to be plotted where A-B=0 such that the crossing becomes clear.
  댓글 수: 1
Shane
Shane 2012년 9월 18일
Bjorn, have you referenced the following topic? It discusses how to plot the intersection with three different cases of surface definitions. It does seem to conclude that you must have at least one explicitly defines durface in order to perform the intersection derivation. However, I believe that if your matricies are of identical size you may be able to perform the derivation but it will be very dependent upon how fine your mesh is and the inherent error that is present in a z1-z2=0 calculation at large intervals of x and y. I hope this helps.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by