| 5 | 1/1 | 返回列表 |
| 查看: 678 | 回復: 5 | |||
| 當前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | |||
[交流]
【求助】急求幫忙解決MATLAB 樣條差值求解微分代碼出現(xiàn)的問題,使代碼正常運行
|
|||
|
function y0=hillsplines3(x0,x,y) if size(x,1)~=1 x=x'; end if size(y,1)~=1 y=y'; end [a,t]=hillsplinex(x,y);a=a';t=t'; for i=1:length(t)-4 phi(i)=powerplus3(x0,t(i:i+4)); end y0=sum(a.*phi); function [ax,tx]=hillsplinex(t,y) h=diff(t);delta=diff(y)./h;n=length(h)+1 d1=pchipendpoint(h(1),h(2),delta(1),delta(2)); dn=pchipendpoint(h(n-1),h(n-2),delta(n-1),delta(n-2)); r=[d1;y';dn]; tx=[t(1)-[1:3]*h(1),t,t(length(t)+[1:3])*h(length(h))]; a=zeros(length(tx)-4,length(tx)-4); for i=1:3 a(1,i)=depowerplus3(t(1),tx(i:i+4)); end for i=length(tx)-6:length(tx)-4 a(length(tx)-4,i)=depowerplus3(t(length(t)),tx(i:i+4)); end for j=2:length(tx)-5 for i=j-1:j+1 a(j,i)=powerplus3(t(j-1),tx(i:i+4)); end end ax=a\r;tx=tx'; function y=powerplus3(x,t) c=t; for i=1:5 c(i)=[]; beta(i)=24/prod(t(i)-c); c=t; end powerplus=abs(x-t).^3; y=0.5*sum(beta.*powerplus); function y=depowerplus3(x,t) c=t; for i=1:5 c(i)=[]; beta(i)=24/prod(t(i)-c); c=t; end powerplus=3*sign(x-t).*(x-t).^2; y=0.5*sum(beta.*powerplus); function d=pchipendpoint(h1,h2,del1,del2) d=((2*h1+h2)*del1-h1*del2)/(h1+h2); if sign(d)~=sign(del1) d=0; elseif(sign(del1)~=sign(del2))&(abs(d)>abs(3*del1)) d=3*del1; end [ Last edited by huameitang05 on 2011-1-4 at 17:21 ] |
» 搶金幣啦!回帖就可以得到:
+5/835
+1/85
+1/80
+1/78
+1/74
+1/53
+1/41
+2/38
+1/36
+1/36
+1/32
+1/31
+1/17
+1/16
+1/12
+1/11
+5/10
+1/7
+1/6
+1/4
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 286求調(diào)劑 +6 | lemonzzn 2026-03-16 | 10/500 |
|
|---|---|---|---|---|
|
[考研] 求調(diào)劑,一志愿:南京航空航天大學大學 ,080500材料科學與工程學碩,總分289分 +3 | @taotao 2026-03-19 | 3/150 |
|
|
[考研] 化學求調(diào)劑 +3 | 臨澤境llllll 2026-03-17 | 4/200 |
|
|
[考研] 346求調(diào)劑[0856] +3 | WayneLim327 2026-03-16 | 6/300 |
|
|
[考研] 本科鄭州大學物理學院,一志愿華科070200學碩,346求調(diào)劑 +4 | 我不是一根蔥 2026-03-18 | 4/200 |
|
|
[考研] 265求調(diào)劑 +3 | 梁梁校校 2026-03-17 | 3/150 |
|
|
[考研] 268求調(diào)劑 +6 | 簡單點0 2026-03-17 | 6/300 |
|
|
[考博] 26博士申請 +3 | 1042136743 2026-03-17 | 3/150 |
|
|
[考研] 326求調(diào)劑 +5 | 上岸的小葡 2026-03-15 | 6/300 |
|
|
[論文投稿] 有沒有大佬發(fā)小論文能帶我個二作 +3 | 增銳漏人 2026-03-17 | 4/200 |
|
|
[考研] 一志愿,福州大學材料專碩339分求調(diào)劑 +3 | 木子momo青爭 2026-03-15 | 3/150 |
|
|
[考研] 0854控制工程 359求調(diào)劑 可跨專業(yè) +3 | 626776879 2026-03-14 | 9/450 |
|
|
[考研] 304求調(diào)劑 +5 | 素年祭語 2026-03-15 | 5/250 |
|
|
[考研] 一志愿華中師范071000,325求調(diào)劑 +6 | RuitingC 2026-03-12 | 6/300 |
|
|
[考研] 本科南京大學一志愿川大藥學327 +3 | 麥田耕者 2026-03-14 | 3/150 |
|
|
[考研] 復試調(diào)劑 +3 | 呼呼?~+123456 2026-03-14 | 3/150 |
|
|
[考研] 328求調(diào)劑 +3 | 5201314Lsy! 2026-03-13 | 6/300 |
|
|
[考研] 329求調(diào)劑 +3 | miaodesi 2026-03-12 | 4/200 |
|
|
[考研] 26調(diào)劑/材料科學與工程/總分295/求收留 +9 | 2026調(diào)劑俠 2026-03-12 | 9/450 |
|
|
[考研] 290求調(diào)劑 +3 | ADT 2026-03-13 | 3/150 |
|