필터 지우기
필터 지우기

3D plot

조회 수: 1 (최근 30일)
zozo
zozo 2011년 12월 19일
답변: James Ryland 2017년 5월 11일
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