help-octave
[Top][All Lists]
Advanced

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

Re: About resize() function


From: Bill Denney
Subject: Re: About resize() function
Date: Thu, 23 Oct 2008 18:02:49 -0400
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

José Luis García Pallero wrote:
> But in fact, not is a destructive resize, or I didn't understand what
> *Values in X are not preserved as they are with `reshape'.* means.
> For example, if:
>
> a=[1 2;3 4];
> resize(a,3,3) returns:
>
> 1 2 0
> 3 4 0
> 0 0 0
>
> Is the function wrong or the help
Both are correct if you do things a little differently.  Values are not
preserved if you make the matrix smaller.  Try the following:

a = [1 2;3 4];
resize(a, 1, 3)

Have a good day,

Bill


reply via email to

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