Hi @koorosh dastan,
Based on the data you provided, it is indeed possible to obtain the patterns in MATLAB using the pattern function. Let me first address the 2D pattern. From the table you provided, it seems that you are interested in obtaining the pattern for a constant phi (azimuth) angle with varying theta (elevation) angles. To achieve this, you can extract the relevant columns from the table and use them as input to the pattern function. Here's an example code snippet that demonstrates how to obtain the 2D
% Extract the relevant columns from the table
theta = table(:, 1);
abs_grlz = table(:, 3);
% Convert the amplitude data to linear scale
abs_grlz_linear = 10.^(abs_grlz/10);
% Plot the 2D pattern
pattern(theta, abs_grlz_linear);
In the code snippet above, table represents the table of data you provided and then it extracts the theta values from the first column and the amplitude values (Abs(Grlz)) from the third column. Since the amplitude values are given in decibels (dB), convert them to linear scale using the formula 10.^(abs_grlz/10). Finally, use the pattern function to plot the 2D pattern.
Now, let's move on to the 3D pattern. The table you provided contains data for various theta and phi angles. To obtain the 3D pattern, you can use the same approach as before, but this time you need to consider both the theta and phi angles. Here's an example code snippet that demonstrates how to obtain the 3D pattern using the pattern function in MATLAB:
% Extract the relevant columns from the table
theta = table(:, 1);
phi = table(:, 2);
abs_grlz = table(:, 4);
% Convert the amplitude data to linear scale
abs_grlz_linear = 10.^(abs_grlz/10);
% Plot the 3D pattern
pattern(theta, phi, abs_grlz_linear);
In the code snippet above, extract the theta values from the first column, the phi values from the second column, and the amplitude values (Abs(Grlz)) from the fourth column of the table and then convert the amplitude values to linear scale and then use the pattern function to plot the 3D pattern. I hope this answers your question. Please let me know if you have any further questions.