About resize() function

Jaroslav Hajek highegg at gmail.com
Fri Oct 24 04:19:39 CDT 2008


On Fri, Oct 24, 2008 at 11:03 AM, David Bateman
<David.Bateman at motorola.com> wrote:
> Jaroslav Hajek wrote:
>>
>> On Fri, Oct 24, 2008 at 10:24 AM, José Luis García Pallero
>> <jgpallero at gmail.com> wrote:
>>
>>>
>>> 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.
>>>
>>
>> I agree. Also, the behaviour when given a single dimension argument is
>> not logical - IMHO, it should do a vector resize (similarly to what
>> assigning to a non-existent vector element does). I intend to patch
>> resize soon, after I finish the patch I'm now working on, improving
>> the speed of dense indexing and cleaning up the indexing code in
>> Array<T>.
>>
>> regards,
>>
>>
>
> If you do check that if you have the Octave-forge comms toolbox installed
> something like
>
> m = 2;
> n = 2.^m;
> a = gf (floor(randn(10,10,n), m);
> b = tril (a)
>
> resize is used in tril and is used so that metadata in the input matrix (for
> the galois field about the primitive polynomial of the field), is preserved
> during the operation.
>

OK, so what? I'm not saying that resize is not useful, I'm just saying that
resize (x, m) should not mean the same as resize (x, m, m). resize
(zeros (3, 1), 4) should, IMHO, give zeros (4, 1), not zeros (4, 4) as
it gives now. That makes no sense to me.

> Regards
> David
>
>
>
> --
> David Bateman                                David.Bateman at motorola.com
> Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) Parc Les
> Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 91193
> Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax)
> The information contained in this communication has been classified as:
> [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola
> Confidential Proprietary
>
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Help-octave mailing list