?? xsingularint.m
字號(hào):
function xSingularInt
% 奇異函數(shù)的積分例子
% An Example of Integration of a Singular function f(x) from a to b
% by using QUAD(adaptive Simpson quadrature)and QUADL(adaptive Lobatto quadrature)
%
% Author: HUANG Huajiang
% Copyright 2002 UNILAB Research Center,
% East China University of Science and Technology, Shanghai, PRC
% $Revision: 1.0 $ $Date: 2002/05/9 $
clear all
clc
% the interval: [a, b], the step: d
a = 0;
b = 1;
d = pi/50;
t = a:d:b;
y = func(t);
format long
% 自適應(yīng)Simpson法(Adaptive Simpson quadrature, low order)
y_quad = quad(@func,a,b)
% 自適應(yīng)Lobatto求積法(Adaptive Lobatto quadrature, high order)
y_quadl = quadl(@func,a,b)
% ------------------------------------------------------------------
function y = func(t) % 奇異函數(shù)(Singular function)
y = 1./(t.^(1/2)+t.^(1/3));
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -