|
From: | Matthias Brennwald |
Subject: | Re: Stupid New User Question |
Date: | Wed, 12 Jul 2006 06:56:27 +0200 |
------------------------------ Message: 5 Date: Tue, 11 Jul 2006 17:37:48 -0400 From: "Pat Ferguson" <address@hidden> Subject: Stupid New User Question To: <address@hidden> Message-ID: <address@hidden> Content-Type: text/plain; charset="us-ascii" I have written a simple function: function retval = killnegatives(x) retval = x; if(retval<0) retval = 0; endif; endfunction
try this: function retval = killnegatives(x) retval = x; retval(retval<0) = 0; endfunction Cheers, Matthias
[Prev in Thread] | Current Thread | [Next in Thread] |