| 2 | 1/1 | 返回列表 |
| 查看: 225 | 回復(fù): 1 | ||||
zyfz新蟲 (初入文壇)
|
[求助]
matlab問題救助
|
|
哪位高手可幫忙看下下面的代碼哪里出錯了,為什么ypred輸出的數(shù)值多于5個呢? x=[470 300 10; 285 80 10; 470 300 120; 470 80 120; 470 80 10 ; 100 190 10;... 100 80 65; 470 190 65; 100 300 54; 100 300 120; 100 80 120; 285 300 10]; y=[8.55 3.79 4.82 0.02 2.75 14.39 2.54 4.35 13 8.5 0.05 11.32]'; x1=x(:,1);x2=x(:,2);x3=x(:,3); fun=@(beta,x) (beta(1)*x2-x3/beta(5))./(1+beta(2)*x1+beta(3)*x2+beta(4)*x3); beta0=[1 0.5 0.2 0.1 2]; [beta,r,j]=nlinfit(x,y,fun,beta0); xinput=[470 300 10; 285 80 10; 470 300 120;470 80 120; 470 80 10]; [ypred,yci]=nlpredci(fun,xinput,beta,r,j); [ Last edited by zyfz on 2012-2-29 at 10:07 ] |
榮譽版主 (著名寫手)
![]() |
專家經(jīng)驗: +4 |
|
x=[470 300 10; 285 80 10; 470 300 120; 470 80 120; 470 80 10 ; 100 190 10;... 100 80 65; 470 190 65; 100 300 54; 100 300 120; 100 80 120; 285 300 10]; y=[8.55 3.79 4.82 0.02 2.75 14.39 2.54 4.35 13 8.5 0.05 11.32]'; %x1=x(:,1);x2=x(:,2);x3=x(:,3); fun=@(beta,x) (beta(1)*x(:,2)-x(:,3)/beta(5))./(1+beta(2)*x(:,1)+beta(3)*x(:,2)+beta(4)*x(:,3)); beta0=[1 0.5 0.2 0.1 2]; [beta,r,j]=nlinfit(x,y,fun,beta0); xinput=[470 300 10; 285 80 10; 470 300 120;470 80 120; 470 80 10]; [ypred,yci]=nlpredci(fun,xinput,beta,r,j); >> [ypred,yci] ans = 8.4315 0.2459 3.9904 0.2219 4.9571 0.1644 0.0118 0.1667 2.6603 0.1419 >> ypred ypred = 8.4315 3.9904 4.9571 0.0118 2.6603 |

| 2 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 生物學(xué)調(diào)劑 +5 | Surekei 2026-03-21 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 求調(diào)劑 +7 | Auroracx 2026-03-22 | 7/350 |
|
|
[考研] 一志愿深大,0703化學(xué),總分302,求調(diào)劑 +4 | 七月-七七 2026-03-21 | 4/200 |
|
|
[考研] 297求調(diào)劑 +11 | 戲精丹丹丹 2026-03-17 | 12/600 |
|
|
[考研] 0805材料320求調(diào)劑 +3 | 深海物語 2026-03-20 | 3/150 |
|
|
[考研] 330求調(diào)劑0854 +3 | assdll 2026-03-21 | 3/150 |
|
|
[考研] 306求調(diào)劑 +4 | chuanzhu川燭 2026-03-18 | 4/200 |
|
|
[考研] 材料工程(專)一志愿985 初試335求調(diào)劑 +3 | hiloiy 2026-03-17 | 4/200 |
|
|
[考研] 二本跨考鄭大材料306英一數(shù)二 +3 | z1z2z3879 2026-03-17 | 3/150 |
|
|
[考研] 一志愿中國石油大學(xué)(華東) 本科齊魯工業(yè)大學(xué) +3 | 石能偉 2026-03-17 | 3/150 |
|
|
[考研] 一志愿重慶大學(xué)085700資源與環(huán)境專碩,總分308求調(diào)劑 +3 | 墨墨漠 2026-03-18 | 3/150 |
|
|
[考研] 求調(diào)劑一志愿南京航空航天大學(xué)289分 +3 | @taotao 2026-03-19 | 3/150 |
|
|
[考研] 319求調(diào)劑 +3 | 小力氣珂珂 2026-03-20 | 3/150 |
|
|
[考研] 工科材料085601 279求調(diào)劑 +7 | 困于星晨 2026-03-17 | 9/450 |
|
|
[考研] 廣西大學(xué)家禽遺傳育種課題組2026年碩士招生(接收計算機專業(yè)調(diào)劑) +3 | 123阿標(biāo) 2026-03-17 | 3/150 |
|
|
[考研] 08工學(xué)調(diào)劑 +5 | 用戶573181 2026-03-20 | 5/250 |
|
|
[考研] 材料考研調(diào)劑 +3 | xwt。 2026-03-19 | 3/150 |
|
|
[考研] 材料,紡織,生物(0856、0710),化學(xué)招生啦 +3 | Eember. 2026-03-17 | 9/450 |
|
|
[考研] 334求調(diào)劑 +3 | 志存高遠(yuǎn)意在機?/a> 2026-03-16 | 3/150 |
|
|
[考研] 321求調(diào)劑 +5 | 大米飯! 2026-03-15 | 5/250 |
|