Hi, Did you read my previous mail? I can understand the logic behind the behaviour that you'd like Octave to have, but I just don't think such a change would be consistent with the rest of the language. If you want a way to create histograms, just use the 'hist' function.
Søren man, 04 02 2008 kl. 10:31 +0330, skrev hossein sajjadi: > Hello > When we perform > >a(b) > Octave engine acts in the following manner: > 1 create an empty array ,say "temp",with its size equals size(b)=[1 4] > 2 temp(1)=a(b(1)) > 3 temp(2)=a(b(2)) > 4 temp(3)=a(b(3)) > 5 temp(4)=a(b(4)) > when we perform a(b)++ current implementation of Octave,that ignores > repetitions, acts: > 1 temp=unique(b) > 2 a(temp)++ > this means a(2)++ thus 'a' becomes [4 6 6] > but if it behave in efficient way it acts: > 1 a(b(1))++ that equals a(2)++ and because a(2) was 5 then we have > a=[4 6 6] > 2 a(b(2))++ that equals a(2)++ and because a(2) was 6 then we have > a=[4 7 6] > 3 a(b(3))++ that equals a(2)++ and because a(2) was 7 then we have > a=[4 8 6] > 4 a(b(4))++ that equals a(2)++ and because a(2) was 9 then we have > a=[4 9 6] > this efficient way is very useful for creating 'histograms'. > Thanks, > Hossein ------------------------------------------------------------------------- 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
