Data Formatting for patternCustom function
15 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Raghunathraju
2023-4-28
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!