资源简介
很好用的洛伦兹曲线拟合的源代码,已经验证可以完全调通

代码片段和文件信息
function [yprime params resnorm residual] = lorentzfit(xyp0boundsnparams)
% LORENTZFIT fits a single- or multi-parameter Lorentzian function to data
%
% LORENTZFIT(XY) returns YPRIME(X) a Lorentzian fit to the data
% found using LSQCURVEFIT. The function Y(X) is fit by the model:
% YPRIME(X) = P1./((X - P2).^2 + P3) + C.
%
% [YPRIME PARAMS RESNORM RESIDUAL] = LORENTZFIT(XY) returns YPRIME(X)
% values in addition to fit-parameters PARAMS = [P1 P2 P3 C]. The RESNORM
% and RESIDUAL outputs from LSQCURVEFIT are also returned.
%
% [...] = LORENTZFIT(XYP0) can be used to provide starting
% values (P0 = [P01 P02 P03 C0]) for the parameters in PARAMS.
%
% [...] = LORENTZFIT(XYP0BOUNDS) may be used to define lower
% and upper bounds for the possbile values for each parameter in PARAMS.
% BOUNDS = [LB1 LB2 LB3 LB4;
% UB1 UB2 UB3 UB4].
% If the user does not wish to manually define values for P0 it may be
% enetered as an empty matrix P0 = []. In this case default values will
% be used. The default bounds for all parameters are (-InfInf).
%
% [...] = LORENTZFIT(XYP0BOUNDSNPARAMS) may be used to specify the
% number of parameters used in the Lorentzian fitting function. The
% number of parameters defined in P0 and BOUNDS must match the function
% specified by NPARAMS. If the user does not wish to manually define
% values for P0 or BOUNDS both may be enetered as empty matricies:
% P0 = []; BOUNDS = [].
%
% -NPARAMS options
%
% ‘1‘ - Single parameter Lorentzian (no constant term)
% L1(X) = 1./(P1(X.^2 + 1))
%
% ‘1c‘ - Single parameter Lorentzian (with constant term)
% L1C(X) = 1./(P1(X.^2 + 1)) + C
%
% ‘2‘ - Two parameter Lorentzian (no constant term)
% L2(X) = P1./(X.^2 + P2)
%
% ‘2c‘ - Two parameter Lorentzian (with constant term)
% L2C(X) = P1./(X.^2 + P2) + C
%
% ‘3‘ - Three parameter Lorentzian (no constant term)
% L3(X) = P1./((X - P2).^2 + P3)
%
% [DEFAULT] ‘3c‘ - Three parameter Lorentzian (with constant term)
% L3C(X) = P1./((X - P2).^2 + P3) + C
%
% X and Y must be the same size numeric and non-complex. P0 and BOUNDS
% must also be numeric and non-complex. NPARAMS is a character array.
%
% Examples:
% x = -16:0.1:35;
% y = 19.4./((x - 7).^2 + 15.8) + randn(size(x))./10;
% [yprime1 params1 resnorm1 residual1] = lorentzfit(xy[20 10 15 0]);
% figure; plot(xy‘b.‘‘LineWidth‘2)
% hold on; plot(xyprime1‘r-‘‘LineWidth‘2)
%
% [yprime2 params2 resnorm2 residual2] = lorentzfit(xy[][]‘3‘);
% figure; plot(xy‘b.‘‘LineWidth‘2)
% hold on; plot(xyprime2‘r-‘‘LineWidth‘2)
%
% See also: lsqcurvefit.
% Jered R Wells
% 11/15/11
% jered [dot
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1326 2012-04-17 14:04 license.txt
文件 10577 2012-04-17 14:04 lorentzfit.m
- 上一篇:杭电数字图像处理作业
- 下一篇:RTPC sar面目标成像
相关资源
- 读取串口数据并画实时曲线的VC 程序
- 绘制曲线图软件
- 串口绘制曲线 将收到的数据进行曲线
- C 源码 画出wav文件声音数据的波形曲
- Douglas-Peucker 曲线离散化算法.rar
- 曲面拟合算法程序
- txt测井曲线转换las2.0(新编)
- 易语言椭圆曲线算法加密文件源码
- 通过3D打印样品发现NMR曲线的不同姿态
- 违反洛伦兹畴壁的超导的近藤效应
- 违反洛伦兹背景的量子校正旋转声学
- SU3重子手性摄动理论的明显洛伦兹不
- 基于曲率信息由曲线到曲面的重建与
- l-CURVE曲线适用于正则化算法
- VMOS管理结构及输出特性曲线电路图
- 自由曲线曲面造型技术(朱心雄)
- 最小二乘法拟合曲线
- 基于蒙特卡洛生成电动汽车充电负荷
- 曲线.zip
- 曲线拟合控件
- SM2椭圆曲线算法软件.rar
- 机器学习-最小二乘法多项式拟合
- SVM算法-回归拟合程序.zip
- rlc串联电路谐振特性曲线
- 原生3次贝塞尔曲线算法地图
- 基于曲线回归方程的矿井主排水泵永
- 洛伦兹AdS / cft对应中的曲率探测器
- 具有不同规则化的三味Nambu–Jona
- 论文研究 - 使用一类带有估计参数的
- 基于拟合优度法的薄板表面风压高斯
评论
共有 条评论