資源簡介
matlab函數,包括:
復化梯形公式
復化Simpson公式
復化四階Newton-Cotes公式
Romberg積分法
Gauss-Legendre積分
Gauss-Chebyshev積分
Gauss-Laguerre積分
Gauss-Hermite積分
及以上四個正交多項式的生成函數

代碼片段和文件信息
function?p?=?ChebyshevIter(n)
%?ChebyshevIter??用遞推的方法計算n次勒讓德-切比雪夫多項式的系數向量?Tn+2(x)?=?2*x*Tn+1(x)?-?Tn(x)
%
%?Synopsis:??p?=?ChebyshevIter(n)
%
%?Input:?????n?=?勒讓德-切比雪夫多項式的次數
%
%?Output:????p?=?n次勒讓德-切比雪夫多項式的系數向量
????if?round(n)?~=?n?|?n?0
????????error(‘n必須是一個非負整數‘);
????end
????
????if?n?==?0???????????????????????%T0(x)?=?1
????????p?=?1;
????????return;
????elseif?n?==?1???????????????????%T1(x)?=?x
????????p?=?[1?0];
????????return;
????end
????
????pBk?=?1;????????????????????????%初始化三項遞推公式后項為T0
????pMid?=?[1?0];???????????????????%初始化三項遞推公式中項為T1
????for?i?=?0:n-2
????????pMidCal?=?zeros(1i+3);?????%構造用于計算的x*Tn+1
????????pMidCal(1:i+2)?=?pMid;
????????pBkCal?=?zeros(1i+3);??????%構造用于計算的Pn
????????pBkCal(3:i+3)?=?pBk;
????????
????????pFwd?=?2*pMidCal?-?pBkCal;??%勒讓德-切比雪夫多項式三項遞推公式Tn+2(x)?=?2*x*Tn+1(x)?-?Tn(x)
????????
????????pBk?=?pMid;?????????????????%把中項變為后項進行下次迭代
????????pMid?=?pFwd;????????????????%把前項變為中項進行下次迭代
????end
????
????p?=?pFwd;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1142??2010-04-05?23:08??Integral\ChebyshevIter.m
?????文件????????983??2010-04-05?23:39??Integral\GaussChebyshevInterg.m
?????文件???????1004??2010-04-05?23:38??Integral\GaussHermiteInterg.m
?????文件???????1532??2010-04-07?12:17??Integral\GaussInterg.m
?????文件????????974??2010-04-05?23:38??Integral\GaussLaguerreInterg.m
?????文件???????1156??2010-04-07?12:17??Integral\GaussLegendreInterg.m
?????文件???????1138??2010-04-05?23:05??Integral\HermiteIter.m
?????文件???????1268??2010-04-05?23:05??Integral\LaguerreIter.m
?????文件???????1191??2010-04-05?23:31??Integral\LegendreIter.m
?????文件????????903??2010-03-19?23:00??Integral\NewtCot4Integ.m
?????文件???????1431??2010-03-19?22:59??Integral\RombergInterg.m
?????文件????????766??2010-03-19?22:59??Integral\SimpsonInteg.m
?????文件????????647??2010-03-19?22:59??Integral\TrapezoidInteg.m
?????文件?????103085??2010-04-14?16:54??Integral\實驗題目2?Romberg積分法.docx
?????目錄??????????0??2010-04-14?16:54??Integral
-----------?---------??----------?-----??----
???????????????117220????????????????????15
評論
共有 條評論