how to plot a 3D matrix in cartezian coordinate?
1 view (last 30 days)
Show older comments
Giselle on 21 Feb 2020
Commented: darova on 6 Mar 2020
I have a 3 dimentional matrix. and each cell has a value. I want to plot this in x-y-z coordinates, where the magnitude of value of each cell define the color of the node(or cell).
I tried scatter3, with no luck. could any body help me?
here is the code to generate the den matrix.
x = linspace(-3,3,512);
y = linspace(-3,3,512);
[X,Y] = meshgrid(x,y);
zz = linspace(0,5,512);
den(:,:,z)=exp(-1 * ((X).^2+(Y).^2 ))*(100/z^2); %den is a 512x512x512 matrix
I looked trough other questions here, but couldn't find the answer.
Daniel Vieira on 21 Feb 2020
Find more on Matrices and Arrays 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!