Why am I loosing a row and a column in MATLAB slice plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Bharath Lohray
am 27 Mai 2015
Beantwortet: Walter Roberson
am 27 Mai 2015
I am trying to plot a 3D volume in MATLAB. I am using the slice command.
a(:,:,1)=[1,2; 3,4];
a(:,:,2)=[5,6; 9,8];
figure;
slice (a,0,0,1);
hold on
slice (a,0,0,2);
The figure I get has just one square (pixel). I am expecting 4 squares. How do I plot this? What am I doing wrong?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150647/image.png)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 27 Mai 2015
Under "Tips" for slice() you will see
The color drawn at each point is determined by interpolation into the volume V.
This is the same issue that hits pcolor: an NxM matrix has (N-1)x(M-1) interior locations.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!