adaptive

版本 1.0.3.0 (159.0 KB) 作者: Alberto Comin
adaptive function evaluation
162.0 次下载
更新时间 2017/1/25

查看许可证

'adaptive.m' allows to efficiently sample a function using a reduced number of points. It works by iteratively adding new points where needed. It is especially useful for functions which are computationally intensive (e.g. involve solving a differential equation).
Examples:
% using default options
[xi, yi] = adaptive(@(x) sin(x)*sin(2*x), [-20,20]);
% explicitly providing initial array an refinement option
f = @(x) exp(-x.^2/4).*sin(3*x);
[xi,yi] = adaptive(f, [ -5:5], 'minAngle',0.8*pi);

引用格式

Alberto Comin (2024). adaptive (https://www.mathworks.com/matlabcentral/fileexchange/61209-adaptive), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.3.0

fixed default settings

1.0.2.0

minor fixes

1.0.1.0

1) new default when called without optional arguments
2) it is now possible to provide a domain range instead of an initial array
3) new key-word argument 'nPoints'
4) now can return domain points and function values as two separate arrays.

1.0.0.0