About resize() function

José Luis García Pallero jgpallero at gmail.com
Fri Oct 24 03:24:01 CDT 2008


Ok, but the fact that some elements are not preserved if the new matrix is
samaller is logical. I think that the help of the function is quite
confused.

2008/10/24 Bill Denney <bill at denney.ws>

> 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
>



-- 
*****************************************
José Luis García Pallero
jgpallero at gmail.com
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20081024/5df35bce/attachment-0001.html 


More information about the Help-octave mailing list