![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/186384/image.png)
I would like to have help to plot 4d matrix in 3d. Is there anyone to help?
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear all
I am dealing with three-dimensional patterns in MATLAB and I would like to visualize in three dimension. But, I am struggling on how to plot 3-dimensional matrix with fourth attribute. It's just 8X8X8 matrix. I tried with slice command as below and got the plot as shown in figure 1 which is not quite what I want.
close all;
obj = load('shadow.mat');% importing data
dyzw = obj.dyzw;
slice(dyzw, [], [], 1:size(dyzw,3));
shading interp
Figure 1:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147398/image.png)
Instead, I want to get similar to figure 2 but in color. This means I want to get rid of whole extent i.e. blue plate. I could not get any idea. I have tried contour3 and also tried to put contour image in layers but I am unable to figure out. Could you please help me in this regard. Figure 2:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147399/image.jpeg)
I appreciate your advice. I have also attached data file in shadow.mat for your reference.
Thanks in advance
댓글 수: 1
merve özkan okay
2017년 2월 25일
편집: merve özkan okay
2017년 2월 25일
Hi, I am doing similar work. I want get rid of background. How did you create Figure2?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/186384/image.png)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!