Hello, I have two question

2 ビュー (過去 30 日間)
Nikita Johnson
Nikita Johnson 2017 年 5 月 27 日
コメント済み: Walter Roberson 2017 年 7 月 5 日
Hello, I have two question-
  1. I need to plot the below figure in a new form which should show only the region which is blue in color into red color and in a transparent cube. The figure should not show any other mesh except the blue region (in red with mesh).
  2. Second thing is at present the dimension displaying on each axis is according to the size of meshgrid(49*33*33), I need to change it to actual room size (12*4*5).
Thanks for your help
  8 件のコメント
Nikita Johnson
Nikita Johnson 2017 年 5 月 30 日
編集済み: Nikita Johnson 2017 年 5 月 30 日
@Walter Roberson, Sir, In the last picture, the yellow represents the region of the dataset (data_inter; of size 49*33*33) which is equal to 1 and "blue" represents all those values which are zeros. Now I wish to plot only yellow region inside cuboid and "blue" should not get plotted.
In simple words, there is 3D meshgrid of size 49*33*33 and represents two values 1 and zeros, I just wish to plot only one of them at a time.
Nikita Johnson
Nikita Johnson 2017 年 5 月 31 日
Kindly Help

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 6 月 11 日
figure
xslice = (1:1:33); %YZ plane over different x-values
yslice = (1:1:49); %XZ plane over different Y-values
zslice = (1:1:33); %XY plane over different z-values
[X, Y, Z] = meshgrid(xslice, yslice, zslice );
data_copy = data_inter;
data_copy(data_copy ~= 1) = nan;
hi = slice(X,Y,Z,data_inter,[1,33],[1,49],1);
xlabel('x-axis')
ylabel('y-axis') %Mind this , explained above*
zlabel('z-axis')
colormap([0 0 0; 1 0 0]);
caxis([0 1])
  3 件のコメント
Nikita Johnson
Nikita Johnson 2017 年 6 月 29 日
編集済み: Nikita Johnson 2017 年 6 月 29 日
I wish to tell you that, this is what I am looking for in this video, but the thing is, the size of data in this video is 5532 * 3 and mine is 49*33*33
https://www.youtube.com/watch?v=Q5TDrQ2dLJg&index=11&list=PLi2lWuI3Qlg0B8ZTlmPEU7S9mvJOgOKFA#t=166.10518
Walter Roberson
Walter Roberson 2017 年 7 月 5 日
You do not appear to have attached your data for us to test with.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by