help-octave
[Top][All Lists]
Advanced

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

Re: Function problem


From: Geordie McBain
Subject: Re: Function problem
Date: Fri, 25 Nov 2005 12:58:38 +1100

I think you want something more like

function y = t (x)
  y = x**2
endfunction


On Thu, 2005-11-24 at 17:45 -0800, blah BLABBER wrote:
> If I define the following function:
> 
> function t (x)
> x**2
> endfunction
> 
> It seems that I cannot multiply this function by a  constant.
> 
> For example:
> 
> Octave:1> 2 * t(4)
> 
> gives an error. The error says: "evaluating binary operator * "
> 
> Can anyone explain why this is ? This does not happen to me with other
> programs. 
> 
> Thanks much.
> 
> 
> 
> 
> ______________________________________________________________________
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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