Plot a 3D matrix

조회 수: 4 (최근 30일)
Sana Ahmed
Sana Ahmed 2020년 4월 3일
댓글: Sana Ahmed 2020년 4월 8일
I have a 3D matrix of 27 components of an eigenvector which are field values on a 3x3x3 grid of points. I want Matlab to plot level surfaces of the field values so I get some nested level surfaces. Can anyone help?
n = 5;
G = numgrid3d(n);
A = delsq3d(G);
size = (n-2)^3;
[V,D] = eigs(A,size);
for i = 1:size
temp = V(i,:);
temp = reshape(temp, [3,3,3]);
figure(i)
plot = surf(temp(1,:,:),temp(:,1,:));
shading interp;
end
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 4월 3일
isosurface(temp, LevelValueGoesHere)
but you will not see anything useful with a 3 x 3 x 3 area.
Sana Ahmed
Sana Ahmed 2020년 4월 8일
Thanks, this worked perfectly!

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

답변 (0개)

카테고리

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