jackdong 发表于 2006-4-9 21:25

[求助]matlab数值积分工具箱nit里面函数的用法!

<P>在网下载了matlab数值积分工具箱nit安装之后,看了一下里面的基本函数,然后想用其中几个试试看,比如先help quadg察看quadg函数的用法,帮助文件如下:<BR><BR> usage:int = quadg('Fun',xlow,xhigh)<BR> or<BR>         int = quadg('Fun',xlow,xhigh,tol)<BR> or<BR>         int = quadg('Fun',xlow,xhigh,tol,trace,p1,p2,....)<BR> <BR> This function works just like QUAD or QUAD8 but uses a Gaussian quadrature<BR> integration scheme.Use this routine instead of QUAD or QUAD8:<BR>if higher accuracy is desired (this works best if the function, <BR>   'Fun', can be approximated by a power series) <BR>or if many similar integrations are going to be done (I think less<BR>   function evaluations will typically be done, but the <BR>   integration points and the weights must be calculated.<BR>   These are saved between integrations so when QUADG<BR>   is called again, the points and weights are all ready<BR>   known.)<BR>or if the function evaluations are time consuming.<BR> Note that if there are discontinuities the integral should be broken up into separate <BR> pieces.And if there are singularities,a more appropriate integration quadrature<BR> should be used (such as the Gauss-Chebyshev).<BR><BR>既然说了This function works just like QUAD or QUAD8 ,我想可以这样用吧<BR>f=quadg('sin(x)',1,2),可这样输入之后却:<BR><BR>??? Error: ()-indexing must appear last in an index expression.<BR>Error in ==&gt; quadg at 56<BR>eval(exec_string);<BR><BR><BR>用quadc也出现同样的问题,请问各位高手这些函数到底怎么用啊,我看了帮助都说是和quad8,quad的用法一样啊,可使用quad8,quad就可以,用nit里面的函数就出错!晕倒!!请高手帮忙!谢谢先!!</P>

jackdong 发表于 2006-4-10 08:44

jackdong 发表于 2006-4-10 15:32

页: [1]
查看完整版本: [求助]matlab数值积分工具箱nit里面函数的用法!