Data Formatting for patternCustom function
15 views (last 30 days)
Show older comments
I am trying to use the patternCustom function to plot a radiation pattern of some data that I have. My data is in the form of three Nx1 vectors: theta, phi, and magnitude where magnitude is a function of theta and phi. The documentation on the patternCustom function here: https://www.mathworks.com/help/antenna/ref/patterncustom.html claims that this is an acceptable format for the data, but when I try to run it with this data, I get a blank plot.
Alternatively, the function successfully generates a plot when I instead give it an arbitrary NxN matrix for the magnitude. (For example, if I just copy my magnitude vector N times using repmat to make a matrix, but the pattern this produces is clearly nonsensical.)
Firstly, I don't understand the meaning of this NxN matrix and how each value in it relates to the values in the theta and phi vectors. Clearly it is not the case that each magnitude value corresponds to one set of theta and phi in the same way that my original data does.
Secondly, I would like to know if there is a way I can meaningfully convert my Nx1 vector into an NxN matrix that would preserve the pattern that I want to plot and successfully generate a plot with this function.
I appreciate advice anyone can give!
0 Comments
Answers (1)
Raghunathraju
on 28 Apr 2023
Hi,
For plotting patternCustom ,the data needs to be as below format ,
load data.mat
phi=data(:,1)
theta=data(:,2)
MageE=data(:,3)
patternCustom(MageE,theta,phi)
0 Comments
See Also
Categories
Find more on Import, Export, and Visualization 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!