# how to plot a 3D matrix in cartezian coordinate?

4 visualizzazioni (ultimi 30 giorni)
Giselle il 21 Feb 2020
Commentato: darova il 6 Mar 2020
Hello,
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);
for z=1:512
den(:,:,z)=exp(-1 * ((X).^2+(Y).^2 ))*(100/z^2); %den is a 512x512x512 matrix
end
I looked trough other questions here, but couldn't find the answer.
##### 3 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
Giselle il 6 Mar 2020
Hi, I did, and it is not what I want. I mean I need to have a full plot, before slice it.
darova il 6 Mar 2020
scatter3?
isosurface

Accedi per commentare.

### Risposte (1)

Daniel Vieira il 21 Feb 2020
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Giselle il 6 Mar 2020
Hi, the matlab 2016 does not have this option.

Accedi per commentare.

### Categorie

Scopri di più su Surface and Mesh Plots in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by