| 5 | 1/1 | 返回列表 |
| 查看: 679 | 回復(fù): 5 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
[交流]
【求助】急求幫忙解決MATLAB 樣條差值求解微分代碼出現(xiàn)的問題,使代碼正常運(yù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/215
+1/86
+1/40
+2/36
+1/31
+1/30
+1/19
+1/13
+5/10
+1/6
+1/6
+1/5
+1/5
+1/4
+1/3
+1/2
+1/2
+1/1
+1/1
+1/1
木蟲 (小有名氣)
|
具體太多代碼沒看...只是說說思路 離散數(shù)據(jù)的微分問題 既然你用的是樣條插值 那就說說這個(gè)方法 數(shù)據(jù)->csapi(x,y)->fnder(cs)->fnval(pp,x) |
木蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0703化學(xué)調(diào)劑 +4 | 18889395102 2026-03-18 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 一志愿武漢理工材料工程專碩調(diào)劑 +4 | Doleres 2026-03-19 | 4/200 |
|
|
[考研] 一志愿 西北大學(xué) ,070300化學(xué)學(xué)碩,總分287,雙非一本,求調(diào)劑。 +3 | 晨昏線與星海 2026-03-19 | 3/150 |
|
|
[考研] 一志愿天大材料與化工(085600)總分338 +5 | 蔡大美女 2026-03-13 | 5/250 |
|
|
[考研] 一志愿985,本科211,0817化學(xué)工程與技術(shù)319求調(diào)劑 +10 | Liwangman 2026-03-15 | 10/500 |
|
|
[考研] 一志愿武理材料305分求調(diào)劑 +5 | 想上岸的鯉魚 2026-03-18 | 6/300 |
|
|
[考研] 311求調(diào)劑 +11 | 冬十三 2026-03-15 | 12/600 |
|
|
[考研] 一志愿西南交大,求調(diào)劑 +4 | 材化逐夢(mèng)人 2026-03-18 | 4/200 |
|
|
[考研] 302求調(diào)劑 +10 | 呼呼呼。。。。 2026-03-17 | 10/500 |
|
|
[考研] 生物學(xué)071000 329分求調(diào)劑 +3 | 我愛生物生物愛?/a> 2026-03-17 | 3/150 |
|
|
[考研] 考研求調(diào)劑 +3 | 橘頌. 2026-03-17 | 4/200 |
|
|
[考研] 278求調(diào)劑 +3 | Yy7400 2026-03-13 | 3/150 |
|
|
[考研] 0856專碩279求調(diào)劑 +5 | 加油加油!? 2026-03-15 | 5/250 |
|
|
[考研] 070305求調(diào)劑 +3 | mlpqaz03 2026-03-14 | 4/200 |
|
|
[考研] 中科大材料與化工319求調(diào)劑 +3 | 孟鑫材料 2026-03-14 | 3/150 |
|
|
[考研] 材料與化工 323 英一+數(shù)二+物化,一志愿:哈工大 本人本科雙一流 +4 | 自由的_飛翔 2026-03-13 | 5/250 |
|
|
[考研] 297求調(diào)劑 +4 | 學(xué)海漂泊 2026-03-13 | 4/200 |
|
|
[考研] [0860]321分求調(diào)劑,ab區(qū)皆可 +4 | 寶貴熱 2026-03-13 | 4/200 |
|
|
[考研] 333求調(diào)劑 +3 | 152697 2026-03-12 | 4/200 |
|
|
[考研] 081200-11408-276學(xué)碩求調(diào)劑 +3 | 崔wj 2026-03-12 | 4/200 |
|