how to output interval spacing from quad, quadl or quadgk?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello - I'd like to know how to get the final interval spacing used when the quad functions converge (quad, quadl or quadgk). Is there an undocumented output variable that might help me here?
Thanks!
0 Commenti
Risposte (1)
Ben Petschel
il 1 Nov 2013
f = @(x)sin(x);
fpeek = @(x)peek(f(x),x);
quad(fpeek,0,pi);
[fq,xq] = peek()
Here xq is a cell array where xq{i} has the points evaluated by quad at step i and fq{i} has the corresponding function values. To get just the list of points evaluated, run
xall = sort(cell2mat(xq'))
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!