[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Integration function
From: |
David Bateman |
Subject: |
Re: Integration function |
Date: |
Tue, 27 Jul 2004 18:18:31 +0200 |
User-agent: |
Mutt/1.4.1i |
What is wrong with passing the constants as globals like
1;
global c;
c = 5;
function y = myfunc (x)
global c;
y = c*x;
endfunction
fprintf ("Quad: %f\n", quad("myfunc", 0, 1));
D.
Daprès edA-qa mort-ora-y <address@hidden> (le 27/07/2004):
> Christoph Dalitz wrote:
> >quad should do what you need. Note that the function name needs to be
> >passed
> >as a string because Octave does not support function variables like Scilab.
>
> Okay, this looks about what I need, except for one thing, I need to pass
> more than one variable to the function to be integrated. These
> additional variables are constant -- that is, technically it is a new
> function, but I need to calculate these variables in script?
>
> Is there any way I can create a new function in a script and use that as
> the function parameter to quad?
>
> --
> edA-qa mort-ora-y
> Idea Architect
> http://disemia.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
> -------------------------------------------------------------
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
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
-------------------------------------------------------------