The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin中文论坛
 Origin 中文论坛 (Chinese Origin Forum)
 用LabTalk进行非线性拟合
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

vickey

14 Posts

Posted - 05/17/2016 :  05:17:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
用LabTalk进行非线性拟合
range fitx=1, fity=3; // 设置第三列为拟合曲线输出列
nlbegin iy:=(1,2) func:=gauss nltree:=Fitresults; //设置拟合条件,把拟合参数放到Fitresults树中
Fitresults.xc = 5; // 设置峰中心初始值为 5.
//Fitresults.f_xc = 1; // 固定峰中心值为1.
nlfit; // 开始拟合直至收敛
fity=fit(fitx); // 通过拟合结果生成拟合曲线放到第三列
nlend 1 1; //输出拟合报告并设置结果为自动更新


拟合完成后参数结果都存储在Fitresults树里,你可以运行Fitresults.=;然后可以看到这个树里面所包含的所有结果。
如果想把结果放到某个cell,可以用下面的:
col(4)[1] = Fitresults.xc; //被高斯拟合中心放到第四列第一个单元格。


希望对大家有用!
感兴趣的同学可以去到下面的参考页学习:
http://www.originlab.com/doc/X-Function/ref/nlbegin

Edited by - vickey on 05/17/2016 10:38:52 PM
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000