|
From: | José Luis García Pallero |
Subject: | Re: About resize() function |
Date: | Fri, 24 Oct 2008 10:24:01 +0200 |
José Luis García Pallero wrote:Both are correct if you do things a little differently. Values are not
> 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
preserved if you make the matrix smaller. Try the following:
resize(a, 1, 3)
a = [1 2;3 4];
Have a good day,
Bill
[Prev in Thread] | Current Thread | [Next in Thread] |