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

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 30일

1 개 추천

Try this
M = readmatrix('MLS-Aura_L2AK-O3-LAT70N_v04-2x_0000d000.txt', 'NumHeaderLines', 22);
M = reshape(M.', 60, []).';
M = M(:, 1:55);

댓글 수: 4

red981
red981 2020년 11월 30일
Hi
Thank you
After the first step, I get a 529 x 6 double, but when using reshape, it complains that
"Product of known dimensions, 60, not divisible into total number of elements, 3174."
/R
Ameer Hamza
Ameer Hamza 2020년 11월 30일
Are you using the same file you gave in the link? After first line, M should be 550x6.
red981
red981 2020년 11월 30일
편집: red981 2020년 11월 30일
Yes, it works now. Perfect! Thank you
Ameer Hamza
Ameer Hamza 2020년 11월 30일
I am glad to be of help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2020년 11월 30일

편집:

2020년 11월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by