[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New manual chapter on vectorization
From: |
Ben Abbott |
Subject: |
Re: New manual chapter on vectorization |
Date: |
Tue, 27 Dec 2011 10:39:10 -0500 |
On Dec 27, 2011, at 1:52 AM, Jordi Gutiérrez Hermoso wrote:
> I will push the cset soon, but this is how it's starting to turn out:
>
>
> http://jordi.platinum.linux.pl/octave.html/Vectorization-and-Faster-Code-Execution.html
>
> I have lots more to say about accumulation and vectorisation examples
> as well as broadcasting, but as far as satisfying the release
> requirements of 3.6, I think this close to done.
>
> Suggestions welcome.
>
> - Jordi G. H.
Nice work Jordi !
There are some minor formatting problems (ex: the result of "x+y" under
broadcasting), if these are still present after you've pushed the changeset, I
/ others can take a look.
Regarding vectorization (assignment ?) topics, I've seen many examples where
loops are used for arrayed structures. Are things like the stuff below already
in the manual ? If not where do they belong?
a = {1, 2:3};
[foo(1:2).bar] = deal (a{:});
foo =
1x2 struct array containing the fields:
bar
b = [foo.bar]
b =
1 2 3
c = {"hello", "world"};
[foo(1:2).bar] = deal (c{:})
foo =
1x2 struct array containing the fields:
bar
d = {foo.bar}
d =
{
[1,1] = hello
[1,2] = world
}
Ben