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: Reading a binary C array in Matlab (reordering elements...)
Replies: 1   Last Post: Mar 12, 2013 1:28 PM

Advanced Search

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

Posts: 77
Registered: 6/6/12
Reading a binary C array in Matlab (reordering elements...)
Posted: Mar 12, 2013 1:28 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Luca " <l.presottoRE@MOVE.campus.unimib.NOTit> wrote in message !
> Can anybody give me some clues?
> Thank you very much!

Got it!
I write it here for the records, in case somebody gets stuck on google for hourse like I did. :-D :-D

It's just
If in C I had:
float Data[nx][ny][nz];

In matlab I should do:

data = reshape (data,nz,ny,nx);
data = permute (data,[3 2 1]);

Pretty obvious indeed....

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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.