Reputation: 17
I wish to open and read the following text file in Scilab (version 6.0.2). The original file is an .xlsx that I have converted to both .txt and .csv through Excel to facilitate opening & working with it in Scilab. Using both fscanfMat and csvRead, scilab only reads the first column as Nan. I understand why the first column is considered as Nan, but I do not see why the rest of the document isn't read. Columns 2 and 3 are in particular of interest to me.
For csvRead, I used :
M=csvRead(chemin+filename," ",",",[],[],[],[],7);
to skip the 7-row header.
Could it be something to do with the way in which the file has been formatted? For anyone able to help, I will try to upload an example of a .txt file and also the original .xlsx file
Files available for download, here: Excel and Text files
Upvotes: 0
Views: 1560
Reputation: 446
If you convert your xlsx file into a xls one with Excel you can read it withthe readxls function.
Upvotes: 2
Reputation: 3004
Your separator is a tabulation character (ascii code 9). Use the following command:
M=csvRead("Probe1_350N_2S.txt",ascii(9),",",[],[],[],[],7);
Upvotes: 1