| 5 | 1/1 | 返回列表 |
| 查看: 1049 | 回復(fù): 6 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
heshuangrong新蟲 (小有名氣)
|
[求助]
MATLAB擬合動(dòng)力學(xué)問題 已有1人參與
|
||
|
程序是書上的,店Debug--Run沒法運(yùn)行,求教各位大俠 function KineticDataFit clear all clc % 動(dòng)力學(xué)數(shù)據(jù) t = [0 20 40 60 120 180 300]; CA = [10 8 6 5 3 2 1]; % 用最小二乘樣條擬合法計(jì)算微分dCA/dt--使用不經(jīng)過實(shí)驗(yàn)點(diǎn)的B樣條插值函數(shù) knots = 3; K = 3; % 三次B樣條 sp = spap2(knots,K,t,CA) sp = spap2(newknt(sp),K,t,CA); pp = fnder(sp) % 計(jì)算B樣條函數(shù)的導(dǎo)函數(shù) dCAdt = fnval(pp,t) % 計(jì)算t處的導(dǎo)函數(shù)值 % 繪制圖形 ti = linspace(t(1),t(end),200); CAi = fnval(sp,ti) plot(t,CA,'ro',ti,CAi,'b-') xlabel('t') ylabel('C_A') figure fnplt(pp) % dCAdti = fnval(pp,ti) % plot(ti,dCAdti,'-') xlabel('t') ylabel('dC/dt') % 線性擬合 rA = dCAdt; y = log(-rA); x = log(CA); p = polyfit(x,y,1); k = exp(p(2)) n = p(1) |
新蟲 (小有名氣)
送紅花一朵 |
為什么我點(diǎn)Debug-run后,在命令窗口紅色顯示undefined function or variable 'spap2',第一行我都把它刪了 發(fā)自小木蟲Android客戶端 |
鐵桿木蟲 (著名寫手)
| 不要輸入帶有function語句的那一行;蛘哂%注釋。我已經(jīng)試過沒問題。 |

鐵桿木蟲 (著名寫手)

鐵桿木蟲 (著名寫手)
|
sp = form: 'B-' knots: [0 0 0 50 120 300 300 300] coefs: [10.0579 6.9123 3.5802 1.3462 0.9975] number: 5 order: 3 dim: 1 pp = form: 'B-' knots: [0 0 78.8178 182.1889 300 300] coefs: [-0.1187 -0.0312 -0.0104 -0.0061] number: 4 order: 2 dim: 1 dCAdt = -0.1187 -0.0965 -0.0743 -0.0521 -0.0229 -0.0109 -0.0061 CAi = Columns 1 through 11 10.0307 9.8531 9.6780 9.5054 9.3353 9.1678 9.0027 8.8402 8.6803 8.5228 8.3679 Columns 12 through 22 8.2155 8.0656 7.9182 7.7734 7.6310 7.4913 7.3540 7.2192 7.0870 6.9573 6.8301 Columns 23 through 33 6.7054 6.5833 6.4637 6.3466 6.2320 6.1200 6.0105 5.9035 5.7990 5.6970 5.5976 Columns 34 through 44 5.5007 5.4063 5.3144 5.2251 5.1382 5.0539 4.9722 4.8929 4.8162 4.7420 4.6703 Columns 45 through 55 4.6011 4.5345 4.4703 4.4088 4.3497 4.2931 4.2391 4.1876 4.1386 4.0916 4.0452 Columns 56 through 66 3.9992 3.9536 3.9085 3.8639 3.8197 3.7760 3.7328 3.6900 3.6476 3.6057 3.5643 Columns 67 through 77 3.5233 3.4828 3.4427 3.4031 3.3640 3.3253 3.2870 3.2492 3.2119 3.1750 3.1386 Columns 78 through 88 3.1027 3.0672 3.0321 2.9975 2.9634 2.9297 2.8965 2.8638 2.8315 2.7996 2.7682 Columns 89 through 99 2.7373 2.7068 2.6768 2.6472 2.6181 2.5895 2.5613 2.5335 2.5062 2.4794 2.4530 Columns 100 through 110 2.4271 2.4017 2.3767 2.3521 2.3280 2.3044 2.2812 2.2585 2.2363 2.2144 2.1931 Columns 111 through 121 2.1722 2.1518 2.1318 2.1123 2.0932 2.0746 2.0564 2.0387 2.0215 2.0047 1.9884 Columns 122 through 132 1.9725 1.9568 1.9413 1.9258 1.9104 1.8950 1.8798 1.8646 1.8496 1.8346 1.8197 Columns 133 through 143 1.8048 1.7901 1.7754 1.7608 1.7463 1.7319 1.7176 1.7033 1.6892 1.6751 1.6611 Columns 144 through 154 1.6472 1.6333 1.6196 1.6059 1.5923 1.5788 1.5654 1.5521 1.5388 1.5256 1.5126 Columns 155 through 165 1.4996 1.4866 1.4738 1.4610 1.4484 1.4358 1.4233 1.4108 1.3985 1.3862 1.3740 Columns 166 through 176 1.3619 1.3499 1.3380 1.3262 1.3144 1.3027 1.2911 1.2796 1.2682 1.2568 1.2456 Columns 177 through 187 1.2344 1.2233 1.2122 1.2013 1.1905 1.1797 1.1690 1.1584 1.1479 1.1374 1.1271 Columns 188 through 198 1.1168 1.1066 1.0965 1.0865 1.0765 1.0667 1.0569 1.0472 1.0376 1.0281 1.0186 Columns 199 through 200 1.0093 1.0000 k = 0.0053 n = 1.3854 |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 328求調(diào)劑,英語六級(jí)551,有科研經(jīng)歷 +5 | 生物工程調(diào)劑 2026-03-17 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 326求調(diào)劑 +5 | 諾貝爾化學(xué)獎(jiǎng)覬?/a> 2026-03-15 | 8/400 |
|
|
[考研] 326求調(diào)劑 +4 | mlpqaz03 2026-03-15 | 4/200 |
|
|
[考研] 工科0856求調(diào)劑 +3 | 沐析汀汀 2026-03-21 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | .m.. 2026-03-21 | 4/200 |
|
|
[考研] 南昌大學(xué)材料專碩311分求調(diào)劑 +6 | 77chaselx 2026-03-20 | 6/300 |
|
|
[考研] 機(jī)械專碩299求調(diào)劑至材料 +3 | kkcoco25 2026-03-16 | 4/200 |
|
|
[考研] 307求調(diào)劑 +3 | wyyyqx 2026-03-17 | 3/150 |
|
|
[考研] 303求調(diào)劑 +5 | 睿08 2026-03-17 | 7/350 |
|
|
[考研] 265求調(diào)劑 +9 | 梁梁校校 2026-03-17 | 9/450 |
|
|
[考研] 324分 085600材料化工求調(diào)劑 +4 | llllkkkhh 2026-03-18 | 4/200 |
|
|
[考研] 321求調(diào)劑 +9 | 何潤(rùn)采123 2026-03-18 | 11/550 |
|
|
[考研] 一志愿西安交通大學(xué) 學(xué)碩 354求調(diào)劑211或者雙一流 +3 | 我想要讀研究生 2026-03-20 | 3/150 |
|
|
[考研] 廣西大學(xué)家禽遺傳育種課題組2026年碩士招生(接收計(jì)算機(jī)專業(yè)調(diào)劑) +3 | 123阿標(biāo) 2026-03-17 | 3/150 |
|
|
[考研] 085601材料工程專碩求調(diào)劑 +10 | 慕寒mio 2026-03-16 | 10/500 |
|
|
[考研] 材料專碩306英一數(shù)二 +10 | z1z2z3879 2026-03-16 | 13/650 |
|
|
[考研] 318求調(diào)劑 +3 | Yanyali 2026-03-15 | 3/150 |
|
|
[考研] 070300化學(xué)學(xué)碩求調(diào)劑 +6 | 太想進(jìn)步了0608 2026-03-16 | 6/300 |
|
|
[考研] 327求調(diào)劑 +6 | 拾光任染 2026-03-15 | 11/550 |
|
|
[考研] 0856專碩279求調(diào)劑 +5 | 加油加油!? 2026-03-15 | 5/250 |
|