how to plot a 3D matrix in cartezian coordinate?

조회 수: 3 (최근 30일)
Giselle
Giselle . 2020년 2월 21일
댓글: darova . 2020년 3월 6일
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
darova
darova 2020년 3월 6일
scatter3?
isosurface

댓글을 달려면 로그인하십시오.

답변 (1개)

Daniel Vieira
Daniel Vieira 2020년 2월 21일
  댓글 수: 1
Giselle
Giselle 2020년 3월 6일
Hi, the matlab 2016 does not have this option.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by