CS计算机代考程序代写 matlab cuda Agda [Content_Types].xml
[Content_Types].xml _rels/.rels matlab/document.xml matlab/output.xml metadata/coreProperties.xml metadata/mwcoreProperties.xml metadata/mwcorePropertiesExtension.xml metadata/mwcorePropertiesReleaseInfo.xml Perform 1d differentiation using differentiation matrix approach. fx=@(x) x.^7 d2fanalytical=@(x)42*x.^5 nx=20; %number of grid points. It is Nx+1 if you follow the notation in the question Lx=2.0; xi=linspace(-1,1,nx)’ Dx=zeros(nx,nx); Deltax=Lx/(nx-1); %Double Derivative matrix for internal nodes D2x=diag(-2*ones(1,nx))+diag(ones(1,nx-1),1)+diag(ones(1,nx-1),-1); %Have to treat boundaries differently D2x(1,1)=1.0;D2x(1,2)=-2;D2x(1,3)=1; D2x(nx,nx)=1.0;D2x(nx,nx-1)=-2;D2x(nx,nx-2)=1; D2x=D2x/Deltax^2; d2fx=D2x*fx(xi) plot(xi,d2fx, […]
CS计算机代考程序代写 matlab cuda Agda [Content_Types].xml Read More »