<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>I'm trying to read
in a file of 16-bit signed data samples (generated by a logging
system).</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>I try reading in the
first 2000 samples using command</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>
Samples=mget(2000,'s',SampleFileHandle);</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>Problem is that only
the first 535 values are read in.</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>Have also tried
reading in using</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008> <FONT face=Arial
size=2>Samples=mtlb_fread(SampleFileHandle,2000,'int16');</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>If I do this I get
an error "...error 10000, End of file reached before all matrix is
read..."</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>If I try to read the
same file in using MATLAB and the command</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008> <FONT face=Arial
size=2>Samples=fread(SampleFileHandle,2000,'int16');</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>then it reads in all
2000 values OK.</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial size=2>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?</FONT></SPAN></DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=160194112-07052008><FONT face=Arial
size=2>BWOfficer</FONT></SPAN></DIV></FONT></DIV>
<P>The information contained in this E-Mail and any subsequent
<BR>correspondence is private and is intended solely for the intended
<BR>recipient(s). The information in this communication may be
<BR>confidential and/or legally privileged. Nothing in this e-mail is
<BR>intended to conclude a contract on behalf of QinetiQ or make QinetiQ
<BR>subject to any other legally binding commitments, unless the e-mail
<BR>contains an express statement to the contrary or incorporates a formal
Purchase Order.</P>
<P>For those other than the recipient any disclosure, copying, <BR>distribution,
or any action taken or omitted to be taken in reliance <BR>on such information
is prohibited and may be unlawful.</P>
<P>Emails and other electronic communication with QinetiQ may be <BR>monitored
and recorded for business purposes including security, audit <BR>and archival
purposes. Any response to this email indicates consent <BR>to this.</P>
<P>Telephone calls to QinetiQ may be monitored or recorded for quality
<BR>control, security and other business purposes.</P>
<P>QinetiQ Limited<BR>Registered in England & Wales: Company
Number:3796233<BR>Registered office: 85 Buckingham Gate, London SW1E 6PD, United
Kingdom<BR>Trading address: Cody Technology Park, Cody Building, Ively Road,
Farnborough, Hampshire, GU14 0LX, United Kingdom <BR><A
href="http://www.QinetiQ.com/home/legal.html">http://www.QinetiQ.com/home/legal.html</A></P>
</BODY></HTML>