MATLAB: Problem using RESHAPE function

opening filereshapetext reading

I am trying to read the following text file:
1 24652U 96063A 96318.74847837 -.00000020 00000-0 00000+0 0 14
2 24652 003.9929 210.6007 7281127 177.7757 190.4436 02.27277888 06
1 24652U 96063A 96319.62211352 -.00000020 00000-0 00000+0 0 31
2 24652 003.9929 210.3183 7284735 178.4392 185.2995 02.27373269 12
1 24652U 96063A 96319.62351606 .00008082 00000-0 30835-2 0 24
2 24652 003.9764 210.1654 7280836 178.5436 186.6267 02.27380102 20
1 24652U 96063A 96319.62356237 .00009638 00000-0 38025-2 0 37
2 24652 003.9632 210.3512 7280110 178.4006 186.6625 02.27374993 25
1 24652U 96063A 96320.49676119 -.00000127 +00000-0 +10000-4 0 00072
2 24652 003.9626 209.9743 7275563 179.0821 184.3511 02.27899371000049
1 24652U 96063A 96320.50002676 .00012628 00000-0 46302-2 0 42
2 24652 003.9699 209.7044 7281567 179.3158 184.1451 02.27404164 41
1 24652U 96063A 96321.80711554 -.00000260 00000-0 10000-4 0 125
2 24652 003.9565 209.4880 7274507 180.0909 179.3623 02.27893681 73
1 24652U 96063A 96321.80729317 -.00002083 00000-0 -71075-3 0 80
2 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 reshape
Product 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

The problem is in the text file you try to import.
Line 10 (2 24652 003.9626 209.9743 7275563 179.0821 184.3511 02.27899371000049) has only 8 numbers...