<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#330000">
    Good answer, thanks!<br>
    <br>
    For the record: instead of calculating  F = intg (a,b,f), i should
    solve F' = f  on a..b with the scilab macro ode<br>
    <br>
    On 26/04/2012 14:33, Stéphane Mottelet wrote:
    <blockquote cite="mid:D9A2538F-F3F9-4115-8FB0-2CCAB06E260D@utc.fr"
      type="cite">
      <div>(sorry for the incomplete message)</div>
      <div><br>
      </div>
      <div>I suggest sorting all the bounds ti and then solve the ode
        y'=f, then compute the integrals  by substracting y(tj)-y(ti),
        where A=tj, B=tj. See ?</div>
      <div><br>
      </div>
      <div>S.<br>
        <br>
        Le 26 avr. 2012 à 14:02, Adrien Vogt-Schilb <<a
          moz-do-not-send="true" href="mailto:vogt@centre-cired.fr">vogt@centre-cired.fr</a>>
        a écrit :<br>
        <br>
      </div>
      <blockquote type="cite">
        <div>
          <meta http-equiv="content-type" content="text/html;
            charset=UTF-8">
          Hi<br>
          <br>
          Scilab has a proceudre that integrates any given real function
          or external:<br>
          <br>
          <div class="refsynopsisdiv">
            <h3 class="title"> </h3>
            <div class="synopsis">
              <pre><span class="default">[v]=</span><span class="functionid">intg</span><span class="default">(a,b,f)</span></pre>
            </div>
          </div>
          <br>
          I have a function f and would like to calculate the integral
          for a set of values , say in A:B<br>
          <br>
          Does anyone know if there is something more efficient than a
          loop on b to do? Currently I do this:<br>
          <br>
          segment = A:B;<br>
          <br>
          for i=1:size(segment,"*")    <span class="default"><br>
                [v(i)]=</span><span class="functionid">intg</span><span
            class="default">(A,segment(i),f)</span>
          <div class="synopsis"> </div>
          end<br>
          <br>
          It's a shame, because I guess that that there should be a way
          to optimize what intg does in this case<br>
          <br>
          <br>
          <div class="moz-signature">-- <br>
            Adrien Vogt-Schilb (Cired) <br>
            Tel: (+33) 1 43 94 <b>73 77</b></div>
        </div>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>