[scilab-Users] reading data with different number of columns

Celso Co celso.co at gmail.com
Sat Sep 25 05:08:29 CEST 2010


Dear Peng,

You can read it as text file. In attached file, run "read.sci" to read
"text.sce".

Regards
cco

On Sat, Sep 25, 2010 at 4:08 AM, Peng Du <eddy.pdu at gmail.com> wrote:
> Dear all,
> How am I suppose to read a data file that does not have a unified length for
> each entry? The file looks like:
> 01 02 03 04 05
> 01 02 03
> 01 02 03
> 01 02 03
> 01 02 03 04 05
> 01 02 03 04 05
> 01 02 03
> 01 02 03
> I tried  [num_read, val(1),val(2),val(3),val(4),val(5)] = mfscanf(fid, "%d
> %d %d %d %d"), but it didn't work.
> Thanks very much.
> Regards,
> Peng
>



-- 
Eng'r Celso B. Co, PhD ECE
Assistant Professor
Dept. of Electronics, Computer, and Communication Engineering,
Loyola Schools of Science and Engineering, Ateneo De Manila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read.sci
Type: application/octet-stream
Size: 63 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20100925/98bdea42/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.sce
Type: application/octet-stream
Size: 96 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20100925/98bdea42/attachment-0001.obj>


More information about the users mailing list