help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing AbsTol for quadcc


From: Pantxo
Subject: Re: Implementing AbsTol for quadcc
Date: Fri, 29 Sep 2017 06:35:33 -0700 (MST)

NJank wrote
> Rik, can you or someone else check the following against your newly pushed
> quadcc? this throws an error in the 4.2,1 release version. unless it's
> something now fixed in your version I think it calls for a bug report.  I
> stumbled on it when I tried to pass a function of x only to integral2:
> 
>>> quadv(@(x) 1, 0,1)
> ans = 1
>>> quad(@(x) 1, 0,1)
> ans = 1
>>> quadgk(@(x) 1, 0,1)
> ans = 1
>>> quadcc(@(x) 1, 0,1)
> error: quadcc: integrand F must return a single, real-valued vector
> 
> _______________________________________________
> Help-octave mailing list

> Help-octave@

> https://lists.gnu.org/mailman/listinfo/help-octave

Hi,

This error is still present on the development branch but if I understand
the documentation correctly, it is expected:

>> The function F must be vectorized and must return a vector of output
>> values if given a vector of input values

So the correct call form should be something like
quadcc (@(x) ones (size (x)), 0,1)

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]