Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Read a 3 dimensional matrix

Subject: Read a 3 dimensional matrix

From: Nikos Makris

Date: 20 Oct, 2010 09:24:04

Message: 1 of 5

Hi,

I have a matrix of 256,288,2209 and i wanna read it . Any idea ? I have found the multibandread command but i m not sure whether is the right one. I would appreciate any help.Thanx

Cheers,
Nikos

Subject: Read a 3 dimensional matrix

From: Sean

Date: 20 Oct, 2010 13:14:04

Message: 2 of 5

"Nikos Makris" <nmakris12@gmail.com> wrote in message <i9mcfk$32l$1@fred.mathworks.com>...
> Hi,
>
> I have a matrix of 256,288,2209 and i wanna read it . Any idea ? I have found the multibandread command but i m not sure whether is the right one. I would appreciate any help.Thanx
>
> Cheers,
> Nikos

What format is it?

help fread

Subject: Read a 3 dimensional matrix

From: Nikos Makris

Date: 20 Oct, 2010 13:30:21

Message: 3 of 5

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i9mpus$m67$1@fred.mathworks.com>...
> "Nikos Makris" <nmakris12@gmail.com> wrote in message <i9mcfk$32l$1@fred.mathworks.com>...
> > Hi,
> >
> > I have a matrix of 256,288,2209 and i wanna read it . Any idea ? I have found the multibandread command but i m not sure whether is the right one. I would appreciate any help.Thanx
> >
> > Cheers,
> > Nikos
>
> What format is it?
>
> help fread


The format is .s (sinograms)
I have already tried to read them using the 'fread' command but what i get is 'out of memory' , probably the matrix is too big...

Thanx ,
Nikos

Subject: Read a 3 dimensional matrix

From: Steven_Lord

Date: 20 Oct, 2010 13:30:45

Message: 4 of 5



"Nikos Makris" <nmakris12@gmail.com> wrote in message
news:i9mcfk$32l$1@fred.mathworks.com...
> Hi,
>
> I have a matrix of 256,288,2209 and i wanna read it . Any idea ?

No, because you haven't said how/where your matrix is stored. If your
matrix was stored in a MAT-file, you should use LOAD. If it's stored in a
text file, LOAD will likely not do what you want but the right answer will
depend on how it's stored. If it's in a database, the Database Toolbox
likely has a command you can use to read it. Etc.

You will need to provide a LOT more information about what you're trying to
do before anyone can give you a useful answer.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Read a 3 dimensional matrix

From: Malcolm McLean

Date: 20 Oct, 2010 14:52:04

Message: 5 of 5

"Nikos Makris" <nmakris12@gmail.com> wrote in message <i9mcfk$32l$1@fred.mathworks.com>...
> I have a matrix of 256,288,2209 and i wanna read it . Any idea ? I have found the multibandread command but i m not sure whether is the right one. I would appreciate any help.Thanx
>
It's not a matrix, it's a multi-dimensional array. Which means that most of the standard data formats like csv won't support it, at least not nicely.

You'll probably have to read the data in line by line (if text) and assign the values to your Matlab object. Then save it as a.mat file and you can load with a simple 'load myfile.mat'.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us