The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: reading files in unix and win95
Replies: 2   Last Post: Jun 3, 1997 5:16 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tariq S Bakir

Posts: 7
Registered: 12/7/04
reading files in unix and win95
Posted: Jun 3, 1997 3:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

i have a script that does the following

% Read the file
out=fopen('mrihead.dat','r');
for r=1:256;
gy(r,:)=fread(out,1,'float');
pr=fread(out,256,'float');
re(r,:)=pr';
ppi=fread(out,256,'float');
im(r,:)=ppi';
end

the script works on a sun machine with matlab5... but when i try the
script on win95 (matlab5) the image is read completley wrong...the wrong
number of bytes is read ( this is my guess)

i tried using data types other than float... but failed

then i thought about converting the data file into a dos format using
unix2dos command ... but also failed....

has any one had similar problem ??
any solutions or ideas?

thanks





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.