3D plot

4 次查看(过去 30 天)
zozo
zozo 2011-12-19
Antenna_X_Pos=[-0.0012;0.1419;-0.0672;-0.1121;0.1173;0.0653;-0.1458;0];
Antenna_Y_Pos=[0.1495;-0.0374;-0.1328;0.0896;0.0880;-0.1347;-0.0340;0];
Antenna_Z_Pos=[0.1269;0.0798;0.0428;0.0002;-0.0407;-0.0816;-0.1249;0];
%scatter3(Antenna_X_Pos,Antenna_Y_Pos,Antenna_Z_Pos),view(-90,90)
%grid on
for j=1:360
theta(j)= j / 180 *pi; % [Edited, Jan Simon: inlined "degtorad()"]
for m=1:90
sita(m)= m / 180 *pi;
[SP_X(j,m) SP_Y(j,m) SP_Z(j,m)] = sph2cart(theta(j),sita(m),10);
for i=1:numel(Antenna_X_Pos)
Distance(i,j,m) = sqrt(((Antenna_X_Pos(i) - SP_X(j,m))^2 +(Antenna_Y_Pos(i) - SP_Y(j,m))^2+(Antenna_Z_Pos(i) - SP_Z(j,m))^2));
end
end
end
Distance
How can I plot Distance in 3D (using i,j,m) ?
  9 个评论
Walter Roberson
Walter Roberson 2011-12-20
You cannot surface plot an 8 x 360 x 90 array. The closest you can come is to use isosurface()
zozo
zozo 2011-12-20
thank you @walter

请先登录,再进行评论。

回答(1 个)

James Ryland
James Ryland 2017-5-11
If you store your distance data as 3D array 8 x 360 x 90 you have several ways to visualize what it looks like.
Both of these solutions turn 3D scaler fields into voxels with color and transparency, thus allowing you to visualize 3D density or distance fields.
Solution 1: Volumetric 3 is a full matlab application for visualizing layered 3D density matrices. It was designed to work with fmri and mri but it can handle arbitrary 3D arrays stored as .mat files.
https://www.mathworks.com/matlabcentral/fileexchange/59161-volumetric-3?s_tid=srchtitle
Solution 2: A much simpler tool is Vol3D. But with a lot of programming on your end you can get it to do pretty much anything volumetric 3 does, in that they use highly similar (though distinct) techniques for generating visualizations.

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by