[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: integral; changed to quad example
From: |
Henry F. Mollet |
Subject: |
Re: integral; changed to quad example |
Date: |
Sat, 20 Aug 2005 10:05:35 -0700 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
I was a little hasty with my question. Due to bad memory I did not remember
the reason for the *new* warning "ABNORMAL RETURN FROM DQAGP"
"Although quad returns a non-zero value for ier, the result is reasonably
accurate (to see why, examine what happens to the result if you move the
lower bound to 0.1, then 0.01, then 0.001, etc."
To actually see what happens near 0 in a plot, I had to use x = linspace
(1,3, 1000), x = linspace (1,3,100) did not show the high-frequency
oscillations near x= 0.
Henry
on 8/20/05 2:16 AM, Marek Szczypinski at address@hidden wrote:
> My guess is that You are using function which operates on vectors and in
> the manual:
> (about function one want to integrate)... It must have the form
>
> y = f (x)
>
> where y and x are scalars
>
> Maybe it is the problem. The ABNORMAL RETURN FROM DQAGP seems to be a
> message from inside of the fortran subroutine DQAGP which is used by quad.
> Hope this helps.
> Marek
>
> Homo sum, humani nihil a me alienum puto.
>
> On Fri, 19 Aug 2005, Henry F. Mollet wrote:
>
>> GNU Octave, version 2.1.71 (powerpc-apple-darwin8.1.0).
>> Example for using quad is given below. Results as given in the example but
>> what is ABNORMAL RETURN FROM DQAGP?
>> Henry
>>
>> octave:10> function y = f (x)
>>> y = x .* sin (1 ./ x) .* sqrt (abs (1 - x));
>>> endfunction
>> octave:11> [v, ier, nfun, err] = quad ("f", 0, 3)
>> ABNORMAL RETURN FROM DQAGP
>> v = 1.9819
>> ier = 1
>> nfun = 5061
>> err = 1.1522e-07
>>
>>
>>
>> on 8/19/05 2:01 AM, Marek Szczypinski at address@hidden wrote:
>>
>>> Hi,
>>> Try:
>>> http://www.octave.org/doc/Functions-of-One-Variable.html
>>> maybe this will help
>>> Marek
>>>
>>> Homo sum, humani nihil a me alienum puto.
>>>
>>> On Thu, 18 Aug 2005, Fred J. wrote:
>>>
>>>> Hello
>>>>
>>>> I need to do an integration
>>>>
>>>> integrate_0^(x-1/2) integrate_(1/2+y)^0 12xy(1-y) dx
>>>> dy
>>>>
>>>> how can I use octave to do this. I have been reading a
>>>> lot in the
>>>> first few pages of the manual but need to know if this
>>>> is even do-able
>>>> with octave?
>>>>
>>>> thanks
>>>>
>>>>
>>>>
>>>> ____________________________________________________
>>>> Start your day with Yahoo! - make it your home page
>>>> http://www.yahoo.com/r/hs
>>>>
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------
>>>> 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
>>>> -------------------------------------------------------------
>>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------
>>> 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
>>> -------------------------------------------------------------
>>>
>>
>>
>>
>>
>> -------------------------------------------------------------
>> 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
>> -------------------------------------------------------------
>>
>
>
>
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
>
-------------------------------------------------------------
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
-------------------------------------------------------------