equivalent of intg on a "discrete interval" (cumsum-like behaviour)
Adrien Vogt-Schilb
vogt at centre-cired.fr
Thu Apr 26 14:02:14 CEST 2012
Hi
Scilab has a proceudre that integrates any given real function or external:
[v]=intg(a,b,f)
I have a function f and would like to calculate the integral for a set
of values , say in A:B
Does anyone know if there is something more efficient than a loop on b
to do? Currently I do this:
segment = A:B;
for i=1:size(segment,"*")
[v(i)]=intg(A,segment(i),f)
end
It's a shame, because I guess that that there should be a way to
optimize what intg does in this case
--
Adrien Vogt-Schilb (Cired)
Tel: (+33) 1 43 94 *73 77*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120426/d5a15177/attachment.htm>
More information about the users
mailing list