catpel.m
来自「MDPSAS工具箱是马里兰大学开发的」· M 代码 · 共 52 行
M
52 行
function B = catpel(tm,colloc)% catpel.m A nonlinear equation model object constructor, derived% from the neqmodel class. Called as%% A = catpel(tm,colloc)%% INPUT PARAMETERS% tm : Thiele modulus% colloc : Collocation/Galerkin on eig'fns switch% (1 = collocation)L = 30; % truncation numberif colloc R = quadgrid('cyln',L,'r',[0 1]); Dr = linearoperator(R,'d','r'); DDr = linearoperator(R,'dd','r'); One = 1; P = 0; % not used for collocation a = scalarfield(R,1); % Solution initial guesselse R = quadgrid('cyln',3*L,'r'); Dr = 0; % not needed DDr = linearoperator(R,'dd','r');% Define basis functions P = truncate( basisfunsl(R,'r',1,0,0,1), L ); One = scalarfield(R,1); a = zeros(L,1); % Solution initial guess end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set up an instance of the catpel objectvar = assocarray({'a' a});param = assocarray({ 'One' One 'Dr' Dr 'DDr' DDr 'tm' tm ... 'L' L 'P' P 'colloc' colloc 'R' R});A = naemodel('catpel',var,param);B = struct([]);B = class(B,'catpel',A);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?