sigm_fit

版本 1.5.0.0 (4.1 KB) 作者: R P
Optimization of parameters of the sigmoid function
7.8K 次下载
更新时间 2016/3/30

查看许可证

Optimization of parameters of the sigmoid function

Syntax:
[param]=sigm_fit(x,y)

that is the same that
[param]=sigm_fit(x,y,[],[],[]) % no fixed_params, automatic initial_params

[param]=sigm_fit(x,y,fixed_params) % automatic initial_params
[param]=sigm_fit(x,y,[],initial_params) % use it when the estimation is poor
[param]=sigm_fit(x,y,fixed_params,initial_params,plot_flag)

param = [min, max, x50, slope]

if fixed_params=[NaN, NaN , NaN , NaN] % or fixed_params=[]
optimization of "min", "max", "x50" and "slope" (default)

if fixed_params=[0, 1 , NaN , NaN]
optimization of x50 and slope of a sigmoid of ranging from 0 to 1


Additional information in the second output, STAT
[param,stat]=sigm_fit(x,y,fixed_params,initial_params,plot_flag)


Example:
%% generate data vectors (x and y)
fsigm = @(param,xval) param(1)+(param(2)-param(1))./(1+10.^((param(3)-xval)*param(4)))
param=[0 1 5 1]; % "min", "max", "x50", "slope"
x=0:0.1:10;
y=fsigm(param,x) + 0.1*randn(size(x));

%% standard parameter estimation
[estimated_params]=sigm_fit(x,y)

%% parameter estimation with forced 0.5 fixed min
[estimated_params]=sigm_fit(x,y,[0.5 NaN NaN NaN])

%% parameter estimation without plotting
[estimated_params]=sigm_fit(x,y,[],[],0)

引用格式

R P (2024). sigm_fit (https://www.mathworks.com/matlabcentral/fileexchange/42641-sigm_fit), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Curve Fitting Toolbox 的更多信息
致谢

参考作品: Sine function fit

启发作品: sigmoid, sigm_fit_val(param,x)

Community Treasure Hunt

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

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

plot bug fixed
title update

1.4.0.0

minmax function used in plotting substituted by min and max functions

1.3.0.0

STAT output variable, with confidence intervals for parameters and distribution

1.0.0.0