matlab求解逆矩阵_1

clear; clc;
t = linspace(0, pi/2, 30)';
x0 = sin(t);
n  = numel(x0);
dt = 1e-9;

% A = rand(n);
A = hilb(n);
temp = A';
A = temp*A;

b  = A*x0;

H = -A;
Ta = H*dt + (H*dt)^2/2 + (H*dt)^3/6;  % Ta(0)
F  = dt * ( eye(n,n) + H*dt/2 + (H*dt)^2/6 + (H*dt)^3/24 );  % F(dt)
x  = F * b;  % x0


for i = 1 : 54
        Ta = 2*Ta + Ta*Ta;
        T  = eye(n,n) + Ta;
        x  = ( eye(n,n) + T ) * x;
end

x = 2 * x;
figure(1)
plot(t,x0,t,x,'o','MarkerFaceColor','red','MarKerSize',4,'MarkerIndices',1:1:n);

 

你可能感兴趣的:(数值分析,数字信号处理)