4D plot of 3 vectors and 3D array

1 ビュー (過去 30 日間)
Dillon Esposito-Kelley
Dillon Esposito-Kelley 2021 年 3 月 31 日
回答済み: Meg Noah 2021 年 4 月 1 日
I have a 3D array that is dependent on the variables of 3 different vectors. I am trying to make a plot with the axises being the vectors and likely color being the 3D array. Each vector is 10 long and the 3D array is a 10,10,10 array of values that are not a direct equation from the vectors.
  3 件のコメント
Chad Greene
Chad Greene 2021 年 3 月 31 日



Meg Noah
Meg Noah 2021 年 4 月 1 日
In this project, I show a couple of 3D vis techniques
[Ny,Nx,Nz] = size(data);
[x3d,y3d,z3d] = meshgrid(1:Nx,1:Ny,1:Nz);
s = data; % this if you want to normalize it -> 0.5*(data(:)-mean(data(:)))/std(data(:))+0.5;
s(s<0) = nan;
% s(s>1) = 1; % this is useful if you normalize it
hs = scatter3(x3d(:),y3d(:),z3d(:),0.5*s(:), ...
s(:),'filled','MarkerEdgeColor','none', ...
'MarkerFaceAlpha',0.05), view(-60,60);
axis equal
axis tight

その他の回答 (0 件)


Find more on Lighting, Transparency, and Shading in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by