Antenna radiation 3d plotting in Scilab
时间:04-05
整理:3721RD
点击:
Can anyone help me with my 3d plot?
I need to plot the Antenna response at given theta and phi angles.
I have 19 steps of theta from -pi/2 to +pi/2 with 10 degrees for each step.
I have 361 steps of phi from -pi to +pi with 1 degree for each step.
for each step of theta I have 361 measured response (R).
In total I have 19*361 = 6859 values of R.
My code is giving me spiky graph rather than a surface graph.
clf;
clear;
C = fscanfMat('C:\Measurements.dat', "%lg");
Theta_Rad = linspace(-%pi/2,%pi/2,19);
Phi_Rad = linspace(-%pi,%pi,361);
R = C(2:6860,2);
n = 1;
for i=1:19
for j=1:361
X(n)= R(n).*sin(Phi_Rad(j))'*cos(Theta_Rad(i));
Y(n)= R(n).*sin(Phi_Rad(j))'*sin(Theta_Rad(i));
Z(n)= R(n).*cos(Phi_Rad(j))'*ones(Theta_Rad(i));
n = n+1;
end;
end
plot3d3(X,Y,Z);
When I compared each cut (of the 19 steps) with the corresponding 2d plot they were identical.
I also tried to use the "mesh" and the "eval3dp" but I keep getting errors.
I want to to have a smooth surface plotting rather than spiky graph.
I would really appreciate it if anyone can help me with this.
Thanks in advanced.
I need to plot the Antenna response at given theta and phi angles.
I have 19 steps of theta from -pi/2 to +pi/2 with 10 degrees for each step.
I have 361 steps of phi from -pi to +pi with 1 degree for each step.
for each step of theta I have 361 measured response (R).
In total I have 19*361 = 6859 values of R.
My code is giving me spiky graph rather than a surface graph.
clf;
clear;
C = fscanfMat('C:\Measurements.dat', "%lg");
Theta_Rad = linspace(-%pi/2,%pi/2,19);
Phi_Rad = linspace(-%pi,%pi,361);
R = C(2:6860,2);
n = 1;
for i=1:19
for j=1:361
X(n)= R(n).*sin(Phi_Rad(j))'*cos(Theta_Rad(i));
Y(n)= R(n).*sin(Phi_Rad(j))'*sin(Theta_Rad(i));
Z(n)= R(n).*cos(Phi_Rad(j))'*ones(Theta_Rad(i));
n = n+1;
end;
end
plot3d3(X,Y,Z);
When I compared each cut (of the 19 steps) with the corresponding 2d plot they were identical.
I also tried to use the "mesh" and the "eval3dp" but I keep getting errors.
I want to to have a smooth surface plotting rather than spiky graph.
I would really appreciate it if anyone can help me with this.
Thanks in advanced.
"Measurements.dat" indicates that you have measured data. Can the spikes come from the data itself?
The plot function I'm using is not displaying a sphere. It is only displaying 19 different contours which share the same center. The diameter at each point of the contour represents the strength of the signal at this specific point. I want to display a sphere rather than isolated contours?
Thanks a lot flanello
I managed to solve it now! It turns out that the measured data were all in db and all negative. Once I added an offset value to make them all positive I got the right plot.
radiation Antenna Scilab 相关文章:
- Radiation pattern of an inverted F antenna IFA
- Real time plotting of radiation pattern using matlab
- Spurious radiation and surface waves in MSP Antenna
- Antenna Radiation pattern multi-lobed and directional with increase in ground plane!
- Improving radiation performance by using a mutual coupled antenna
- Radiation Pattern Check
