Integration differences between Windows version and Linux version of Octave

Adrian Spiridon spiriad at yahoo.com
Thu May 21 11:51:52 CDT 2009


Hello there !

         I saw a difference btween Octave in Windows (v. 3.0.3) and Octave in Linux (v. 3.0.1). Suppose I want to integrate the function
f (x) =  1/(x^3-2*x-5) on the interval [0, 2]. I  write an M-file function myfun.m that computes
the integrand:

function y = myfun(x) 
y = 1./(x.^3-2*x-5);
endfunction

,and I use the quad function like this :Q = quad(@myfun,0,2)
    Using windows program the result is Q= -0.4605    --> CORRECT
    Using linux version the result is Q=   0.87910--> WRONG
    
   I have taken this example from the MATLABdocumentation siteso it is absolutely correct.

....what may be the reason ?

Regards,
Spiridon Adrian



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090521/3b962617/attachment.html 


More information about the Bug-octave mailing list