⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 as.m

📁 LiScNLS is a Matlab application for the numerical study of some nonlinear differential equations o
💻 M
字号:
function [c,rez,drez,kod]=as(lam,phi,phip,x,wint,wipr,dom,c0,m,errtol,fun)
%
% Calculates the coefficients c of the function associated to c0 
%
[n,N]=size(phi);dc0=[eye(m);zeros(N-m,m)];dc=zeros(N,m);drez=zeros(m,m);rez=zeros(m,1);
for k=1:25
    u=phi*c0;up=phip*c0;
    du=phi*dc0;dup=phip*dc0;
    [Nu,Npu,Npup]=feval(fun,x,u,up);  
    C=wip(Nu,phi,wipr,wint,dom);% iterations for u
    c=[c0(1:m);C(m+1:N)./lam(m+1:N)];test(k)=norm(c-c0);
    Cp=wip(repmat(Npu,[1,m]).*du+repmat(Npup,[1,m]).*dup,phi,wipr,wint,dom);% iterations for du
    dc=[dc0(1:m,:);Cp(m+1:N,:)./repmat(lam(m+1:N),[1,m])];test(k)=test(k)+norm(dc-dc0,1);
    if test(k)<errtol kod=k;break;end
    if (k>3 & test(k)>test(k-1) & test(k-1)>test(k-2) & test(k-2)>test(k-3)) kod=-2;return;end
    c0=c;dc0=dc;
end
if k==25 kod=-1;return;end
rez=lam(1:m).*c0(1:m)-C(1:m);
drez=diag(lam(1:m)).*eye(m)-Cp(1:m,:);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -