Plot a 3D matrix
4 次查看(过去 30 天)
显示 更早的评论
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
2020-4-3
isosurface(temp, LevelValueGoesHere)
but you will not see anything useful with a 3 x 3 x 3 area.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!