I am trying to read the following text file:
1 24652U 96063A 96318.74847837 -.00000020 00000-0 00000+0 0 142 24652 003.9929 210.6007 7281127 177.7757 190.4436 02.27277888 061 24652U 96063A 96319.62211352 -.00000020 00000-0 00000+0 0 312 24652 003.9929 210.3183 7284735 178.4392 185.2995 02.27373269 121 24652U 96063A 96319.62351606 .00008082 00000-0 30835-2 0 242 24652 003.9764 210.1654 7280836 178.5436 186.6267 02.27380102 201 24652U 96063A 96319.62356237 .00009638 00000-0 38025-2 0 372 24652 003.9632 210.3512 7280110 178.4006 186.6625 02.27374993 251 24652U 96063A 96320.49676119 -.00000127 +00000-0 +10000-4 0 000722 24652 003.9626 209.9743 7275563 179.0821 184.3511 02.278993710000491 24652U 96063A 96320.50002676 .00012628 00000-0 46302-2 0 422 24652 003.9699 209.7044 7281567 179.3158 184.1451 02.27404164 411 24652U 96063A 96321.80711554 -.00000260 00000-0 10000-4 0 1252 24652 003.9565 209.4880 7274507 180.0909 179.3623 02.27893681 731 24652U 96063A 96321.80729317 -.00002083 00000-0 -71075-3 0 802 24652 003.9582 209.4681 7275726 180.1221 179.5119 02.27890411 73
Using
fid=fopen('Arabsat 2B.txt');A=textscan(fid,'%s');Data=reshape(A{1}(1:end,:),9,[])';fclose(fid);format long g;l1=Data(1:2:end,:);l2=Data(2:2:end,:);
I was able to read another almost similar text file but when I try to run the code i get the error:
Error using reshapeProduct of known dimensions, 9, not divisible into total number of elements, 56085.Error in getTLE2 (line 10)Data=reshape(A{1}(1:end,:),9,[])';
Kindly help that where am i going wrong.
Best Answer