help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loop


From: Michael Grossbach
Subject: Re: loop
Date: Thu, 04 Jun 2009 14:36:39 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Carlo Rossi wrote:
Sorry, I'm a very newbie. the code isn't work

??? Error using ==> max
MAX with two matrices to compare and two output arguments is not supported.

anyway I don't understand what you trying to do with the '2' and the 'cc'

thanks,

--- Gio 4/6/09, Jaroslav Hajek <address@hidden> ha scritto:

Da: Jaroslav Hajek <address@hidden>
Oggetto: Re: loop
A: "Carlo Rossi" <address@hidden>
Cc: address@hidden
Data: Giovedì 4 giugno 2009, 07:14
On Thu, Jun 4, 2009 at 2:53 AM, Carlo
Rossi <address@hidden>
wrote:
Hello,
 I need to write this:

     for z=1 : size (counting,1)
       cl = find ( counting(z,:) ==
max(counting(z,:)));
       pp = [pp; cl(1) ];
     end

I'm looking for something more compat. Is there?
For example is there a way to avoid to write the "for
z=1 : size....."
thanks,


[cc, pp] = max (counting, 2);

sometimes I wonder why we actually bother with docs :)


As Jaroslav suggested: read the manual!
Type 'help max' (without the quotes) at the Octave prompt.

Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]