Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: read in matrix from .dat file
Replies: 3   Last Post: Apr 19, 2013 7:43 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alex

Posts: 22
Registered: 2/11/11
read in matrix from .dat file
Posted: Aug 16, 2011 5:15 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have been looking around the newsreader as well as other search engines for an answer to a problem I'm having, but haven't had any luck.
I have a camera that records data as a .sif file, and exports it as a .dat file. The video has a resolution of 512x512, is 600 frames in length, and the file size is 300MB. It may be exporting the video as a 307200x514 array (it adds a column of padding to both sides of the array, and stacks the frames together as rows ), but I'm not sure as I cant get the file open. It should be a space delimited file containing only numbers representing intensities on the camera, no text. My question is how to read the .dat file into matlab as an array.
I have tried:

A = fread('new02z.dat')
A = fopen('new02z.dat');
A = fopen('new02z.dat','r')
fid = ('new02z.dat')
A = fread(fid, [307200,514]);
A = textread('new02z.dat');
A = dlmread('new02z.dat',' ');
A = dlmread('new02z.dat',' ',0,0);
and the import data wizard.

all either imported a single digit, or returned error messages to which I have not found a solution for.
I am running 7.11.0 R2010b if that helps.

Thanks,
Alex



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.