global_fit

版本 1.0.45 (259.2 KB) 作者: Maximilian Schönau
Find the global optimum for a fit optimization problem fast.
37.0 次下载
更新时间 2022/10/12

查看许可证

When working with an optimization problem, like fitting a function to a given dataset, one often needs to find a global minimum instead of a local one (see: this MATLAB page). This can be done using the Global Optimization Toolbox. However, by vectorizing the optimization problem, the global minimum can often be calculated a lot faster, because parameter combinations can be calculated simultaneously..
f = global_fit(x, y, fun, ranges, nGrid) does fit x and y to fun, trying out nGrid values for every free parameter in fun within the defined ranges. It returns the fit as a function of x.
This function creates a grid of parameter combinations and calculates all of the combinations simultaneously and vectorized, which results in good computational speeds. After the mse between the given model and data is calculated for the grid, the result is polished using fminsearch, to find the local minimum at the optimal grid position.

引用格式

Maximilian Schönau (2024). global_fit (https://www.mathworks.com/matlabcentral/fileexchange/115095-global_fit), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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

.

1.0.44

Equations disappear...

1.0.43

Equations disappeared from Example.

1.0.42

Improved IV Plot.

1.0.3

Improved spelling

1.0.2

Edited Example

1.0.1

Added Example

1.0.0