HOW TO IMPORT MATLAB DATA FROM Text files (* .txt)
2 views (last 30 days)
Show older comments
Ricardo Gutierrez
on 5 Dec 2018
Edited: per isakson
on 6 Dec 2018
Hello good day.
I have a text file with 8 columns.
I have a file in Matlab.
I want Matlab to take only the third column, then multiply it with a variable that is in the Matlab file.
How do I achieve this?
Greetings and thanks
TEXT FILE each column has 180 values
Elev. [deg.] Azim. [deg.] Abs(Gain)[ ] Abs(Cross)[ ] Phase(Cross)[deg.] Abs(Copol)[ ] Phase(Copol)[deg.] Ax.Ratio[ ]
------------------------------------------------------------------------------------------------------------------------------------------------------
-90.000 0.000 1.336e-01 8.497e-02 303.859 4.863e-02 312.490 1.378e+01
-89.000 0.000 1.340e-01 8.535e-02 301.531 4.867e-02 312.418 1.092e+01
-88.000 0.000 1.350e-01 8.632e-02 299.208 4.872e-02 312.284 9.094e+00
-87.000 0.000 1.367e-01 8.792e-02 296.909 4.876e-02 312.087 7.846e+00
-86.000 0.000 1.390e-01 9.016e-02 294.655 4.880e-02 311.826 6.952e+00
-85.000 0.000 1.419e-01 9.305e-02 292.465 4.883e-02 311.503 6.294e+00
Matlab file code example
AFSC=(C1*exp(((i*k*x1)*sin(TETA).*cos(PHI)))
How I multiply the third column in text file to the code in Matlab ???
Accepted Answer
Victor Quezada
on 6 Dec 2018
Try something explained here: https://la.mathworks.com/help/matlab/import_export/ways-to-import-text-files.html
0 Comments
More Answers (1)
See Also
Categories
Find more on Data Import and Export 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!