Add line in combined surface-plot where surfaces cross

1 次查看(过去 30 天)
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