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: How to read an n-dimensioned matrix from a binary file
Replies: 2   Last Post: Feb 13, 2013 1:00 PM

Advanced Search

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

Posts: 1,975
Registered: 8/5/09
Re: How to read an n-dimensioned matrix from a binary file
Posted: Feb 13, 2013 11:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jim " <psugrad1990@gmail.com> wrote in message <kfgcv4$61l$1@newscl01ah.mathworks.com>...
> I would like to write a Matlab script to read an N-dimensioned matrix created in Fortran. Specifically, the Fortran code wrote to a binary file using the following:
>
> write(30) a, b, c
>
> with the following declarations for a,b,c
>
> real a(16,20,22,6,3, 2)
>
> real b(16,20,22,6,3,13)
>
> real c(16,20,22,6,3,13)
>
> In Matlab, it seems that fread handles only a vector or 2-dimesional matrix
> fread(fileID, sizeA) where sizeA is a vector of size n or 2-dimensional matrix [m,n].
>
> How can I read the N-dimensioned matrix I described?


Cross-posted on Answers. See my comments there ...

James Tursa



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

[Privacy Policy] [Terms of Use]

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