Curve fitting 不用toolbox求解

看板MATLAB作者 (髒髒)時間8年前 (2016/09/13 12:52), 編輯推噓1(107)
留言8則, 4人參與, 最新討論串1/2 (看更多)
Signal (y軸) 23.6360000000000 14.0574000000000 6.72888000000000 3.86307000000000 2.54284000000000 2.01951000000000 1.76490000000000 1.55241000000000 1.44080000000000 1.37599000000000 1.31569000000000 1.27775000000000 1.23654000000000 1.20946000000000 1.19213000000000 echotime (x軸) 7.73700000000000 13.3570000000000 18.9770000000000 24.5970000000000 30.2170000000000 35.8370000000000 41.4570000000000 47.0770000000000 52.6970000000000 58.3170000000000 63.9370000000000 69.5570000000000 75.1770000000000 80.7970000000000 86.4170000000000 請問怎麼畫這15個data的curve fitting用下面兩條式子 f1=A+s0*exp(-te/t2) f2=A+s0*exp(-te/t2a)+(1-f)*exp(-te/t2b) 除了te是echotime 但其他參數都是未知數啊啊啊啊 Matlab 裡的curve fitting toolbox畫出來的不對啊...... 求code,兩曲線圖,未知參數 先謝謝各位神人 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.128.96.250 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1473742343.A.4D5.html

09/13 16:19, , 1F
model1: y=A+s0*exp(-x/t2),A=1.206,s0=56.41,t2=8.522
09/13 16:19, 1F

09/13 16:21, , 2F
model2: A=1.206,f=-55.41,s0=.4893,t2a=.3377,t2b=8.522
09/13 16:21, 2F

09/13 16:22, , 3F
他背後是解非線性代數方程 有可能一開始不收斂
09/13 16:22, 3F

09/13 16:23, , 4F
可以進Fit Options調整
09/13 16:23, 4F

09/13 20:34, , 5F
連非線性代數都不會才需要code解救啊= =''
09/13 20:34, 5F

09/13 21:17, , 6F
我的數據就是用toolbox算出來的
09/13 21:17, 6F

09/13 22:26, , 7F
可以用toolbox求,重點是起始猜值要對
09/13 22:26, 7F

10/02 01:29, , 8F
會不會是你的起始值給得不好?多灑幾點試試看
10/02 01:29, 8F
文章代碼(AID): #1NruO7JL (MATLAB)
文章代碼(AID): #1NruO7JL (MATLAB)