Norm of transition matrix
3 views (last 30 days)
Show older comments
It's a 2by2 transition matrix, and i'm writing the entries of the transition matrix as x_i here. A is the transition matrix with the four entries. Also, FYI, the norm of a transition matrix is the square root of the maximum eigenvalue of A(transpose)*A.
Below is my code, and somehow the graph is not showing anything. Could someone explain to me what i did wrong here?
odesys = @(t,x) [(0.1*cos(2*t)-0.1)*x(1) + x(3)*(-0.1*sin(2*t)+1); (0.1*cos(2*t)-0.1)*x(2)+x(4)*(-0.1*sin(2*t)+1);(-0.1*sin(2*t)-1)*x(1) + x(3)*(-0.1*cos(2*t)-0.1); (-0.1*sin(2*t)-1)*x(2)+x(4)*(-0.1*cos(2*t)-0.1)];
x0 = [1; 0; 0;1];
tspan = [0 50];
[t, x] = ode45(odesys, tspan, x0);
A = [x(1) x(2);x(3) x(4)];
B = transpose(A);
C = mtimes(B,A);
b = max(eig(C));
plot(t, sqrt(b));
legend('norm', 'Location', 'NE')
0 Comments
Accepted Answer
Walter Roberson
on 29 Nov 2018
for K = 1 : size(x,1);
A = [x(K,1), x(K,2);x(K,3), x(K,4)];
B = transpose(A);
C = mtimes(B,A);
b(K) = max(eig(C));
end
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!