csvTextScan unexpected behaviour on separators
Reported by Oscar van der Velde
I realize my type of data is formatted, so the msscanf function would be the more appropriate one to use.
However, the Atoms csv_readwrite module before v0.6 in Scilab 5.3.3 used to do a good job on this data:
!67200.999762419 40.966898 -0.262274 7279.7 0.77 13.6 0037 !
! !
!67201.000202098 40.921647 -0.104834 9037.0 2.36 14.7 003f !
! !
!67201.001540389 40.926605 -0.119784 9622.2 1.63 15.1 003f !
! !
!67201.001670842 41.535461 -0.923526 3754.7 0.73 19.1 003f !
! !
!67201.001976426 40.951865 0.213778 9654.5 0.95 19.0 003e !
using this command:
dat = csv_textscan(data," ", ".", "string")
which takes one space symbol as separator, but correctly retrieves the column data.
In Scilab 5.4.0 (Windows 7 64-bits) the columns are not matched properly with that command.
Instead,
dat = csvTextScan(data," ", ".", "string")
with 3 spaces as separator seems to work, although it is not clear why, since the data itself is separated by 2, 3, 2, 2, 1 spaces respectively.
This inconsistency looks like a bug and the use of separators in this way is not described in the HelpBrowser.