help-octave
[Top][All Lists]
Advanced

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

average of a function


From: Fred J.
Subject: average of a function
Date: Mon, 8 Nov 2004 19:36:48 -0800 (PST)

Hello

debian 2.6.8 i686-pc-GNU/Linux
GNU Octave, version 2.1.60

I just started with octave, and appreciate some help
with this simple 
task, could not get much help from reading the FAQs
and the manual.

OK, 
I need to determine the average value of this function
which I expect
it to be -1.620993 but I am getting a different ans
and not sure if I am
using octave correctly.

octave> function y=x(t), y = t^2 - 5*t + 6*cos(pi*t);
end;
octave> quad('x', -1, 5/2)
ans = -5.6735


Thanks


                
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



-------------------------------------------------------------
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]