91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡(jiǎn)介

高斯-拉蓋爾積分(Gauss-laguerre積分)matlab程序 可直接在函數(shù)名前設(shè)置輸出為 [x,w]= 其中x為積分點(diǎn),w為權(quán)重

資源截圖

代碼片段和文件信息

function?laguerre_rule?(?order?a?b?filename?)

%*****************************************************************************80
%?可直接在函數(shù)名前設(shè)置輸出為??[xw]=??其中x為積分點(diǎn),w為權(quán)重,此處為求積分,因此w之和可能不為1。
%%?LAGUERRE_RULE?generates?a?Gauss-Laguerre?rule.
%
%??Discussion:
%
%????This?program?computes?a?standard?or?exponentially?weighted?
%????Gauss-Laguerre?quadrature?rule?and?writes?it?to?a?file.
%
%????The?user?specifies:
%????*?the?ORDER?(number?of?points)?in?the?rule;
%????*?A?the?left?endpoint;
%????*?B?the?scale?factor?in?the?exponential;
%????*?FILENAME?the?root?name?of?the?output?files.
%
%??Licensing:
%
%????This?code?is?distributed?under?the?GNU?LGPL?license.
%
%??Modified:
%
%????10?February?2014
%
%??Author:
%
%????John?Burkardt
%
??timestamp?(?);
??fprintf?(?1?‘\n‘?);
??fprintf?(?1?‘LAGUERRE_RULE\n‘?);
??fprintf?(?1?‘??MATLAB?version\n‘?);
??fprintf?(?1?‘\n‘?);
??fprintf?(?1?‘??Compute?a?Gauss-Laguerre?rule?for?approximating\n‘?);
??fprintf?(?1?‘????Integral?(?a?<=?x???fprintf?(?1?‘??of?order?ORDER.\n‘?);
??fprintf?(?1?‘\n‘?);
??fprintf?(?1?‘??The?user?specifies?ORDER?A?B?and?FILENAME.\n‘?);
??fprintf?(?1?‘\n‘?);
??fprintf?(?1?‘??ORDER?is?the?number?of?points.\n‘?);
??fprintf?(?1?‘??A?is?the?left?endpoint?(typically?0).\n‘?);
??fprintf?(?1?‘??B?is?the?exponential?scale?factor?(typically?1).\n‘?);
??fprintf?(?1?‘??FILENAME?is?used?to?generate?3?files:\n‘?);
??fprintf?(?1?‘??*?filename_w.txt?-?the?weight?file\n‘?);
??fprintf?(?1?‘??*?filename_x.txt?-?the?abscissa?file.\n‘?);
??fprintf?(?1?‘??*?filename_r.txt?-?the?region?file.\n‘?);
%
%??Initialize?the?parameters.
%
??alpha?=?0.0;
??beta?=?0.0;
%
%??Get?ORDER.
%
??if?(?nargin?????order?=?input?(?‘??Enter?the?rule?order?ORDER:??‘?);
??elseif?(?ischar?(?order?)?)
????order?=?str2num?(?order?);
??end
%
%??Get?A.
%
??if?(?nargin?????fprintf?(?1?‘\n‘?);
????fprintf?(?1?‘??A?is?the?left?endpoint?typically?0.\n‘?);
????fprintf?(?1?‘\n‘?);
????a?=?input?(?‘??Enter?the?value?of?A.‘?);
??elseif?(?ischar?(?a?)?)
????a?=?str2num?(?a?);
??end
%
%??Get?B.
%
??if?(?nargin?????fprintf?(?1?‘\n‘?);
????fprintf?(?1?‘??B?is?the?exponential?scale?factor?typically?1.\n‘?);
????fprintf?(?1?‘\n‘?);
????b?=?input?(?‘??Enter?the?value?of?B.‘?);
??elseif?(?ischar?(?b?)?)
????b?=?str2num?(?b?);
??end
%
%??Get?the?quadrature?file?root?name:
%
??if?(?nargin?????fprintf?(?1?‘\n‘?);
????fprintf?(?1?‘??FILENAME?specifies??the?‘‘root?name‘‘?of?a?set?of?quadrature?files).\n‘?);
????filename?=?input?(?‘??Enter?the?value?of?FILENAME?as?a?quoted?string:??‘?);
??end
%
%??Input?summary.
%
??fprintf?(?1?‘\n‘?);
??fprintf?(?1?‘??ORDER?=?%d\n‘?order?);
??fprintf?(?1?‘??A?=?%f\n‘?a);
??fprintf?(?1?‘??B?=?%f\n‘?b?);
??fprintf?(?1?‘??FILENAME?=?“%s“.\n‘?filename?);
%
%??Construct?the?rule.
%
??kind?=?5;
??[?x?w?]?=?cgqf?(?order?kind?alpha?beta

評(píng)論

共有 條評(píng)論