Read .txt file into a matrix

3 views (last 30 days)
red981
red981 on 30 Nov 2020
Edited: red981 on 30 Nov 2020
Hi!
I would like to ask for suggestions on how could I read the data downloaded in a .txt document from:
into a 55 x 55 double in Matlab.
Thanks!
/R

Accepted Answer

Ameer Hamza
Ameer Hamza on 30 Nov 2020
Try this
M = readmatrix('MLS-Aura_L2AK-O3-LAT70N_v04-2x_0000d000.txt', 'NumHeaderLines', 22);
M = reshape(M.', 60, []).';
M = M(:, 1:55);
  4 Comments
red981
red981 on 30 Nov 2020
Edited: red981 on 30 Nov 2020
Yes, it works now. Perfect! Thank you
Ameer Hamza
Ameer Hamza on 30 Nov 2020
I am glad to be of help!

Sign in to comment.

More Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!