How can I generate a plane to use with the SLICE command which is appropriately sized in MATLAB 7.8 (R2009a)?
이전 댓글 표시
I am using the SLICE command to slice my data with a plane at a particular angle. I create a plane and then rotate it (with the ROTATE command) appropriately. However, the resulting plane is too small and I cannot see the volumetric data on the slice.
[x,y,z] = meshgrid(0:0.05:4.5 ,0:0.1:2.3,1:1:3000);
v = x.*exp(-x.^2-y.^2-z/100.^2);
xmin = min(x(:)); ymin = min(y(:));
xmax = max(x(:)); ymax = max(y(:));
hslice = surf(linspace(xmin,xmax,100),...
linspace(ymin,ymax,100),...
zeros(100));
rotate(hslice,[1,0,0],90)
rotate(hslice,[0,0,1],45)
xd = get(hslice,'XData');
yd = get(hslice,'YData');
zd=get(hslice,'ZData');
delete(hslice)
h = slice(x,y,z,v,xd,yd,zd);
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Volume Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!