Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Need to draw a plane

Asked by joy on 24 Nov 2012

Hello I have a 3d plot like this http://s10.postimage.org/k551sbnah/fig.jpg

in this fig I need to draw plane at z axis at 3.9*10^-3,,,from this plane i can specify which points lies above 0.0039 and below of it

any idea////

0 Comments

joy

Tags

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 24 Nov 2012
Accepted answer
XL = get(gca, 'XLim');
YL = get(gca, 'YLim');
zpos = 0.0039
patch([XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5));

6 Comments

Walter Roberson on 24 Nov 2012
transparency = 0.2;    %mostly clear
patch(XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5), [0 .2 .7], 'AlphaData', transparency);
joy on 24 Nov 2012

using this command,I am getting following errors..how to rectify???

??? Error using ==> patch Bad property value found. Object Name : patch Property Name : 'AlphaDataMapping'

Walter Roberson on 24 Nov 2012

Sorry, should be 'FaceAlpha' instead of 'AlphaData'

Walter Roberson

Contact us