Re: Problem with reading a Data File



Sanaul Haq wrote:
Hi,
I got stuck with reading a Data file using matlab which actually
consist of floating point numbers. I think the data which i read
is in Binary format because it doesnot work with Load command.
i am using the following commands to read it.
fid=fopen('filename','r');
A = fread(fid); %(A is displayed as decimal number from 0 to 255)
disp(char(A'));
The last command display the data in rectangular boxes and different
Symbols but doesnot display floating point numbers.

How should i solve this problem.

Sana Khan


because char(A) interprets the numbers as ascii code, and quite a few of them have no visual representation (such as ESC or BELL). what are you trying to do anyways? how does the file look if you open it in an editor, e.g. by typing

edit filename

where filename is the name of the file. is it readable or just garbage?


michael
.



Relevant Pages

  • Problem with reading a Data File
    ... is in Binary format because it doesnot work with Load command. ... The last command display the data in rectangular boxes and different ... Symbols but doesnot display floating point numbers. ...
    (comp.soft-sys.matlab)
  • Re: Need help guys
    ... floating above the model. ... What command do I use to connect the surface to the model? ... Considering it is a curved surface so I cannot extrude it conventionally ...
    (comp.cad.solidworks)
  • Re: Subtraction Bug in VB
    ... Goto Immediate window give the command like ... > floating point numbers. ... Whether you want to call it a bug or a fault, it is a deficiency and is ...
    (microsoft.public.vb.bugs)
  • Re: Subtraction Bug in VB
    ... Goto Immediate window give the command like ... floating point numbers. ... Visual Basic and Arithmetic Precision ...
    (microsoft.public.vb.bugs)