打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
matlab拟合
1. Copy the data into some file named test1.txt

Fig. 1
2. Open Matlab, load the test1.txt into Matlab workspace

Fig. 2

Fig. 3

Fig. 4

Fig. 5
3. Generate T and x vector:
Enter T= test1(:, 1), x= test1(:, 3) in the command window

Fig. 6
4. Enter cftool in the command window:
cftool

Fig. 7
Choose Data…and choose X Data: x, Y Data: T

Fig. 8

Fig. 9
Then Click “Create data set”

Fig. 10
Close it

Choose “Fitting…” (see the second red box in Fig. 8)

Fig. 11
Click “New Fit”
Choose “Type of fit”= “Custom Equations”

Fig. 12
Click “New”

Fig. 13
Choose “General Equations”

Fig. 14
Enter the equation you want to fit:
Box 1: T
Box 2: log(x) %% in Matlab log(x) is the ln(x) in traditional math (log(x)=ln(x), log10(x)=lg(x))
Box 4: The data here is auto create by Matlab (default), you can ignore it for the present
BTW, you can change the equation from log(x)= A+B/T+C*log(T) to x= exp(A+B/T+C*log(T)) or something like this, but perhaps it will not affect the fitting results.

Fig. 15
Click “OK”
Back to the Fitting window, Click “Apply”

Fig. 16
OK, the result shows as follows.
If the result is not as you expected, you can choose “Fitting options” to adjust some parameters such as SartPoint (like Box 4 Fig. 15). Try by yourself please, any question please ask Google.


Fig. 17
To make the fitting figure looks better, you can drag the legend in the right-upper corner by click the left mouse without release.

Fig. 18
OK, that’s all. Almost forget that the Matlab I used in the tutorial is:

Fig. 19
I have no idea that whether all Matlab has cftool. You can try to test is by enter cftool in the command window by yourself. Hope it works on your machine.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
基于多因素的道路线形拟合方法综合评价
[求助]Matlab的cftool 曲线拟合具体用法 - Matlab 基础问题 - Ma...
C#调用Matlab 生成的com组件,生成com 时错误的解决
关于matlab安装后无法与.m、.mat、.fig文件之类关联解决方案
Matlab的曲线拟合工具箱CFtool使用简介
【转】最小二乘法与matlab拟合工具箱cftool
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服