Using patternCustom to plot antenna Radiation Pattern in one figure
I’m using MATALAB R2020A with the Antenna toolbox to generate 2-D Plots of the measured Radiation Pattern (power in dBi) of an antenna, saved in an excel file. I wish to plot the Z-X Plane, and Z-Y Plane slice of the RP, but can’t seem to understand how to combine the "right side" and "left side" pattern to create one plot. As I understand it has to do with using the polarpattern class, but I cant seem to use it correctly. It would also be great to know how to fix the legend, and add a plot title.
clearvars; %clear all worskspace variables
close all; %Close all figures
%% ——Get data from excel sheet———
% %Get Anttena Powerb(dBi) data 13x17array
% filename=’RawAntennaData.xlsx’;
% H = table2array(readtable(filename,’Sheet’,’Horizontal’,’Range’,’B2:R14′));%
% %Get Theta (Elevation) and Phi (Azimuth) data, respectively a 13×1 and 1×17 array
% El= table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’A2:A14′));%Elevation, "Vertical" Angle from 0 to pi
% Az = table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’B1:R1′));%Azismuth, "Horizontal" angle -pi to pi
%% — Get data for Helix type antenna Radiation pattern—-
h = helix;
[H,Az,El] = pattern(h,2e9);
theta = El;
phi = Az’;
MagE = H’;
%% 3-D Plot of Antenna Radiation pattern
figure;
patternCustom(MAgE, theta, phi);% 3D plot in Polar cordinates
%% —– 2-D Plot of Z-X Plane (Theta) Cut with phi/Azimuth=90, in Polar coordinates ——-
figure; % Plot Z-X RP data points (for Y=0, phi=0°) at +X axis (right side)
A= patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,0);
%p = polarpattern(‘gco’);
%P = polarpattern(p,’TitleTop’,’Polar Pattern of Monopole’);
hold on
%figure; % Plot Z-X RP data points (for Y=0, phi=180°) at -X axis (left side)
B=patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,180);
hold off
legend(‘A’, ‘B’);I’m using MATALAB R2020A with the Antenna toolbox to generate 2-D Plots of the measured Radiation Pattern (power in dBi) of an antenna, saved in an excel file. I wish to plot the Z-X Plane, and Z-Y Plane slice of the RP, but can’t seem to understand how to combine the "right side" and "left side" pattern to create one plot. As I understand it has to do with using the polarpattern class, but I cant seem to use it correctly. It would also be great to know how to fix the legend, and add a plot title.
clearvars; %clear all worskspace variables
close all; %Close all figures
%% ——Get data from excel sheet———
% %Get Anttena Powerb(dBi) data 13x17array
% filename=’RawAntennaData.xlsx’;
% H = table2array(readtable(filename,’Sheet’,’Horizontal’,’Range’,’B2:R14′));%
% %Get Theta (Elevation) and Phi (Azimuth) data, respectively a 13×1 and 1×17 array
% El= table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’A2:A14′));%Elevation, "Vertical" Angle from 0 to pi
% Az = table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’B1:R1′));%Azismuth, "Horizontal" angle -pi to pi
%% — Get data for Helix type antenna Radiation pattern—-
h = helix;
[H,Az,El] = pattern(h,2e9);
theta = El;
phi = Az’;
MagE = H’;
%% 3-D Plot of Antenna Radiation pattern
figure;
patternCustom(MAgE, theta, phi);% 3D plot in Polar cordinates
%% —– 2-D Plot of Z-X Plane (Theta) Cut with phi/Azimuth=90, in Polar coordinates ——-
figure; % Plot Z-X RP data points (for Y=0, phi=0°) at +X axis (right side)
A= patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,0);
%p = polarpattern(‘gco’);
%P = polarpattern(p,’TitleTop’,’Polar Pattern of Monopole’);
hold on
%figure; % Plot Z-X RP data points (for Y=0, phi=180°) at -X axis (left side)
B=patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,180);
hold off
legend(‘A’, ‘B’); I’m using MATALAB R2020A with the Antenna toolbox to generate 2-D Plots of the measured Radiation Pattern (power in dBi) of an antenna, saved in an excel file. I wish to plot the Z-X Plane, and Z-Y Plane slice of the RP, but can’t seem to understand how to combine the "right side" and "left side" pattern to create one plot. As I understand it has to do with using the polarpattern class, but I cant seem to use it correctly. It would also be great to know how to fix the legend, and add a plot title.
clearvars; %clear all worskspace variables
close all; %Close all figures
%% ——Get data from excel sheet———
% %Get Anttena Powerb(dBi) data 13x17array
% filename=’RawAntennaData.xlsx’;
% H = table2array(readtable(filename,’Sheet’,’Horizontal’,’Range’,’B2:R14′));%
% %Get Theta (Elevation) and Phi (Azimuth) data, respectively a 13×1 and 1×17 array
% El= table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’A2:A14′));%Elevation, "Vertical" Angle from 0 to pi
% Az = table2array(readtable(filename,’Sheet’,’Sheet1′,’Range’,’B1:R1′));%Azismuth, "Horizontal" angle -pi to pi
%% — Get data for Helix type antenna Radiation pattern—-
h = helix;
[H,Az,El] = pattern(h,2e9);
theta = El;
phi = Az’;
MagE = H’;
%% 3-D Plot of Antenna Radiation pattern
figure;
patternCustom(MAgE, theta, phi);% 3D plot in Polar cordinates
%% —– 2-D Plot of Z-X Plane (Theta) Cut with phi/Azimuth=90, in Polar coordinates ——-
figure; % Plot Z-X RP data points (for Y=0, phi=0°) at +X axis (right side)
A= patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,0);
%p = polarpattern(‘gco’);
%P = polarpattern(p,’TitleTop’,’Polar Pattern of Monopole’);
hold on
%figure; % Plot Z-X RP data points (for Y=0, phi=180°) at -X axis (left side)
B=patternCustom(MagE, theta, phi,’CoordinateSystem’,’polar’,’Slice’,’phi’,’SliceValue’,180);
hold off
legend(‘A’, ‘B’); patterncustom, antenna toolbox, polarpattern class, 2d polar plots MATLAB Answers — New Questions