Hello,
I have a file called "SSL.dat". The second line has some numbers I need but it's full of spaces and letters.
fidssl = fopen('SSL.txt','r');line1ssl=fgetl(fidssl); line2ssl=fgetl(fidssl); %line where the data I need is
This line has the following contents:
mass(Msun) 1.000 9.547922048e-4 2.858857575e-4 4.366245355e-5 5.151391279e-5 8.3459e-9 3.040433607e-6 1.660477111e-7 2.448326284e-6 3.227778035e-7 6.607313077e-9
There are spaces, not tabs, separating each column. I need to remove the letters and split each mass value into a vector so that the vector index matches the column number of said value.
For example, the value "1.000" would match mass(1) and so on.
Can anyone help?
Best Answer