[scilab-Users] equivalent of intg on a "discrete interval" (cumsum-like behaviour)

Stéphane Mottelet stephane.mottelet at utc.fr
Thu Apr 26 14:27:19 CEST 2012


Hello,

I suggest sorti c

Le 26 avr. 2012 à 14:02, Adrien Vogt-Schilb <vogt at centre-cired.fr> a écrit :

> 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/7e1aba77/attachment.htm>


More information about the users mailing list