Problem reading data file using mget

Officer Bruce W BWOFFICER at qinetiq.com
Wed May 7 14:54:45 CEST 2008


I'm trying to read in a file of 16-bit signed data samples (generated by
a logging system).
 
I try reading in the first 2000 samples using command
    Samples=mget(2000,'s',SampleFileHandle);
 
Problem is that only the first 535 values are read in.
 
Have also tried reading in using
    Samples=mtlb_fread(SampleFileHandle,2000,'int16');
 
If I do this I get an error "...error 10000, End of file reached before
all matrix is read..."
 
If I try to read the same file in using MATLAB and the command
    Samples=fread(SampleFileHandle,2000,'int16');
then it reads in all 2000 values OK.
 
I wonder whether Scilab is misinterpreting one of the data values as an
end-of-file marker, possibly the 536th value since that is where mget
stops. When I read in using MATLAB, it turns out that the 536th element
of Samples array is 26. Is this of special significance?
 
BWOfficer

The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England & Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, Hampshire, GU14 0LX, United Kingdom 
http://www.QinetiQ.com/home/legal.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20080507/f9c83687/attachment.htm>


More information about the users mailing list