Effacer les filtres
Effacer les filtres

2D or 3D from CST to matlab

8 vues (au cours des 30 derniers jours)
koorosh dastan
koorosh dastan il y a environ 14 heures
Commenté : Umar il y a environ 11 heures
i work withh pattern function in matlab but i can get the result and only get err i dont know i can use it or not?
i get text from cst like it for 2D
Theta [deg.] Phi [deg.] Abs(Grlz)[dBi ] Abs(Theta)[dBi ] Phase(Theta)[deg.] Abs(Phi )[dBi ] Phase(Phi )[deg.] Ax.Ratio[dB ]
------------------------------------------------------------------------------------------------------------------------------------------------------
-180.000 90.000 -9.255e+00 -1.298e+01 149.214 -1.165e+01 26.420 5.450e+00
-179.900 90.000 -9.239e+00 -1.295e+01 148.947 -1.165e+01 26.368 5.407e+00
-179.800 90.000 -9.224e+00 -1.292e+01 148.681 -1.164e+01 26.315 5.364e+00
-179.700 90.000 -9.208e+00 -1.289e+01 148.418 -1.163e+01 26.263 5.321e+00
.
.
.
179.600 90.000 -9.319e+00 -1.309e+01 150.304 -1.168e+01 26.638 5.627e+00
179.700 90.000 -9.303e+00 -1.306e+01 150.029 -1.168e+01 26.584 5.582e+00
179.800 90.000 -9.287e+00 -1.303e+01 149.755 -1.167e+01 26.530 5.537e+00
179.900 90.000 -9.271e+00 -1.300e+01 149.484 -1.166e+01 26.477 5.493e+00
in above table i only use first three column which means i like to have pattern in constant phi with various theta
in cst i get this pattern and i want get it in matlab
or about 3d
Theta [deg.] Phi [deg.] Abs(Grlz)[dBi ] Abs(Theta)[dBi ] Phase(Theta)[deg.] Abs(Phi )[dBi ] Phase(Phi )[deg.] Ax.Ratio[dB ]
------------------------------------------------------------------------------------------------------------------------------------------------------
-180.000 -90.000 -9.255e+00 -1.298e+01 329.214 -1.165e+01 206.420 5.450e+00
-175.000 -90.000 -1.014e+01 -1.456e+01 345.709 -1.209e+01 209.583 8.372e+00
-170.000 -90.000 -1.106e+01 -1.607e+01 10.515 -1.271e+01 214.066 1.431e+01
.
.
.
170.000 -85.000 -8.273e+00 -1.118e+01 315.069 -1.139e+01 209.010 2.476e+00
175.000 -85.000 -8.594e+00 -1.155e+01 323.022 -1.166e+01 209.504 3.672e+00
.
.
-180.000 -80.000 -9.255e+00 -1.209e+01 338.042 -1.245e+01 214.316 5.450e+00
-175.000 -80.000 -1.012e+01 -1.327e+01 353.629 -1.299e+01 213.416 8.835e+00
-170.000 -80.000 -1.082e+01 -1.409e+01 16.458 -1.358e+01 212.867 1.684e+01
.
.
160.000 90.000 -1.153e+01 -1.477e+01 248.847 -1.431e+01 48.753 1.504e+01
165.000 90.000 -1.162e+01 -1.622e+01 221.795 -1.347e+01 40.323 3.825e+01
170.000 90.000 -1.106e+01 -1.607e+01 190.515 -1.271e+01 34.066 1.431e+01
175.000 90.000 -1.014e+01 -1.456e+01 165.709 -1.209e+01 29.583 8.372e+00
is it posssible to get them from matlab with patten func or other way
  1 commentaire
Umar
Umar il y a environ 11 heures
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.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by