Why am I loosing a row and a column in MATLAB slice plot?

1 回表示 (過去 30 日間)
Bharath Lohray
Bharath Lohray 2015 年 5 月 27 日
回答済み: Walter Roberson 2015 年 5 月 27 日
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?

採用された回答

Walter Roberson
Walter Roberson 2015 年 5 月 27 日
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 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by