Looking for a method to import .txt file containing both strings& numbers in Octave

35 Views Asked by At

Hope you're doing well,

I've been assigned a task to make plotting data easier for the lab I work in. I am trying to import a .txt file with the following format into Octave: Datafile labdata1.txt

It looks to me like the data file has 2 header lines, 9 number columns following by 1 string column , one more number column and 1 more string column.

In my past work I used importdata() to accomplish this. My import trial below.

f1 = 'labdata1.txt'
delimiterIn = "\t";
headerLinesIn = 3;
Fdata_1 = importdata(f1,delimiterIn,headerLinesIn)

But this now throws me an error, as follows:

>> ImportTrial
f1 = labdata1.txt
error: missing_idx(13): out of bound 12 (dimensions are 1x12)
error: called from
    importdata>importdata_ascii at line 320 column 21
    importdata at line 133 column 40
    ImportTrial at line 8 column 9

Anyone know what's going on here? Help is much appreciated!

Best regards, Canter

Trial is already explained above

0

There are 0 best solutions below