for some reason i want to set the zdata of a surface plot object to zero, keeping its color, and setting view point to [0 0 1] (looking at it from the top).
code used:
surfobjhandle=surf(X,Y,Z);
colordata=get(surfobjhandle,'cdata');
view([0 0 1]);
set(surfobjhandle,'zdata',zeros(size(get(surfobjhandle,'zdata'))));
set(surfobjhandle,'cdata',colordata);
however, this way the surface is not visible anymore with the viewpoint set to [0 0 1]. it only appears setting a different viewpoint which is not what i want. why is this?
댓글 수: 4
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_95190
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_95190
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96578
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96578
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96579
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96579
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96580
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/45571-surface-disappears-when-zdata-is-set-to-0#comment_96580
댓글을 달려면 로그인하십시오.