patternCustom 3D radiation plot not showing up
12 views (last 30 days)
Show older comments
I am working on an antenna array for a university project, as a part of this project I have measured the antennas response to a sweep of frequencies from 2.4 to 2.5 GHz, using a MVG SG24. I have pasted the data from these measurements to a csv file, and use that as the source for the data used in MatLab. The code compiles without any issues, but when looking at the 3D plot, the radiation pattern does not show up. I cannot for the life of me figure out why. I don't know if there are anyone here who might know what I am doing wrong. I have attached the code I am using right now, as well as the source file and the 3D plot as it looks when compiling the code.
opts = detectImportOptions("Antenna Array Spherical data_Polar H_Polar V_Polar Θ_Polar Ф_E Total.csv");
opts.DataLines = 3;
opts.VariableNamesLine = 2;
patchData = readmatrix("Antenna Array Spherical data_Polar H_Polar V_Polar Θ_Polar Ф_E Total.csv",opts)
realTheta= patchData(:,8)
realPhi = patchData(:,10)
magnitudeE = patchData(:,12)
patternCustom(magnitudeE,realTheta,realPhi)
0 Comments
Answers (1)
Jonathan
on 20 Dec 2023
I think your data is not in the correct units. You probably need to convert you data, which I presume is in radians to degrees.
While I don't have the Antenna Toolbox there is an example in the patternCustom help from which I took the sample data and compared to your sample data:
% Example from patternCustom docs
helixdata = readmatrix("antennadata_test.csv");
[min_example, max_example] = bounds(helixdata(:, [3 2 1]))
Yields:
min_example =
-15.6520 0 -180.0000
max_example =
8.6820 180.0000 180.0000
% Your sample data
opts = detectImportOptions("Antenna Array Spherical data_Polar H_Polar V_Polar Θ_Polar Ф_E Total.csv");
opts.DataLines = 3;
opts.VariableNamesLine = 2;
patchData = readmatrix("Antenna Array Spherical data_Polar H_Polar V_Polar Θ_Polar Ф_E Total.csv",opts);
[min_sample, max_sample] = bounds(patchData(:, [12 10 8]))
Yields:
min_sample =
-37.1451 -0.6027 -0.4201
max_sample =
-1.9327 0.2049 0.7570
0 Comments
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!