help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Save a 1x1 matrix


From: Paolo Piacentini
Subject: RE: Save a 1x1 matrix
Date: Mon, 2 Aug 2010 14:32:59 -0700

>> Do you want to load the file into another program?

Exactly. I need to assure that another parser finds S(1,1) as matrix type.
Hence, I would need Octave to save S(1,N) always as matrix even when N=1.

Regards.

> From: address@hidden
> To: address@hidden
> Subject: Re: Save a 1x1 matrix
> Date: Mon, 2 Aug 2010 23:19:53 +0200
> CC: address@hidden
>
> Am Montag, 2. August 2010 20:27:24 schrieb PaoloPiace:
> > I'm dealing with a variable S(1:N), i.e. a matrix of real numbers that
> > varies its size (N) down to 1.
> >
> > When saving S on file with "save" I need it to be saved as matrix 1xN,
> > regardless N.
> >
> > Hence, when N = 1, I need S(1,1) to be saved on file as matrix 1x1 and not
> > as scalar.
> >
> > How can I do that?
> >
> > Thanks!
> >
> What is the reason you need it that way? Do you want to load the file into
> another program?
> If you reload it into octave itself a scalar is automatically a 1x1 matrix.
>
> - mh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]