*The ++ operator is not so efficient.*
for example
>a=[4,5,6]
ans=
4 5 6
>b=[2,2,2,2]
ans=
2 3 1
>a(b)++ ;
>a
ans=
4 6 6
this means a(b(1))+1
the efficient method is:
>a(b)++ should be equal
a(b(1))+1
a(b(2))+1
a(b(3))+1
a(b(4))+1
that gives
a(b(1))+1=a(2)+1=5+1
a(b(2))+1=a(2)+1=5+1+1
a(b(3))+1=a(2)+1=5+1+1+1
a(b(4))+1=a(2)+1=5+1+1+1+1
finally 'a' should be :
[4 9 6]
++ operator will be very efficient if this method is implemented.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev