tstar=40 tstar = 40 40/500 ans = 0.0800 40/2500 ans = 0.0160 1/50 ans = 0.0200 % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); stiff 40/2500 ans = 0.0160 2/100 ans = 0.0200 40/2400 ans = 0.0167 40/2300 ans = 0.0174 40/2200 ans = 0.0182 40/2100 ans = 0.0190 40/2000 ans = 0.0200 2/100 ans = 0.0200 % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); Lstability clear all close all % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); Lstability % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); Lstability % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); Lstability A=rand(4) A = 0.8147 0.6324 0.9575 0.9572 0.9058 0.0975 0.9649 0.4854 0.1270 0.2785 0.1576 0.8003 0.9134 0.5469 0.9706 0.1419 expm(A) ans = 4.7204 2.4561 4.1836 3.6737 2.9289 2.4812 3.2288 2.5767 1.4100 1.0458 2.5691 1.8036 3.0394 1.9091 3.3480 3.3748 help log2 LOG2 Base 2 logarithm and dissect floating point number. Y = LOG2(X) is the base 2 logarithm of the elements of X. [F,E] = LOG2(X) for each element of the real array X, returns an array F of real numbers, usually in the range 0.5 <= abs(F) < 1, and an array E of integers, so that X = F .* 2.^E. Any zeros in X produce F = 0 and E = 0. This corresponds to the ANSI C function frexp() and the IEEE floating point standard function logb(). See also log, log10, pow2, nextpow2, realmax, realmin. Overloaded methods: sym/log2 Reference page in Help browser doc log2 2^1024 ans = Inf 2^1023 ans = 8.9885e+307 [f,e]=log2(4.5) f = 0.5625 e = 3 f*2^e ans = 4.5000 x=4.5 x = 4.5000 x/(2^e) ans = 0.5625 x/(2^(e+1)) ans = 0.2812 log2(x) ans = 2.1699 ceil(log2(x))+1 ans = 4 A=toeplitz([-2,1,0,0,0]) A = -2 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -2 expm(A) ans = Columns 1 through 4 0.2153 0.1865 0.0864 0.0274 0.1865 0.3016 0.2139 0.0928 0.0864 0.2139 0.3081 0.2139 0.0274 0.0928 0.2139 0.3016 0.0064 0.0274 0.0864 0.1865 Column 5 0.0064 0.0274 0.0864 0.1865 0.2153 A=rand(4) A = 0.4218 0.6557 0.6787 0.6555 0.9157 0.0357 0.7577 0.1712 0.7922 0.8491 0.7431 0.7060 0.9595 0.9340 0.3922 0.0318 phi1m(A) ans = 1.8552 0.8374 0.8887 0.6703 0.9369 1.4742 0.8366 0.4304 1.2005 1.0655 2.0763 0.8007 1.0448 0.8910 0.7391 1.3728 phi1m(1) ans = 1.7183 exp(1)-1 ans = 1.7183 a=rand(1) a = 0.2769 phi1m(a) ans = 1.1522 (exp(a)-1)/a ans = 1.1522 phi1m(A) ans = 1.8552 0.8374 0.8887 0.6703 0.9369 1.4742 0.8366 0.4304 1.2005 1.0655 2.0763 0.8007 1.0448 0.8910 0.7391 1.3728 A\(expm(A)-eye(4)) ans = 1.8552 0.8374 0.8887 0.6703 0.9369 1.4742 0.8366 0.4304 1.2005 1.0655 2.0763 0.8007 1.0448 0.8910 0.7391 1.3728 A=[1,2,3;4,5,6;7,8,9] A = 1 2 3 4 5 6 7 8 9 det(A) ans = 0 phi1m(A) ans = 1.0e+05 * 0.6943 0.8530 1.0118 1.5722 1.9318 2.2914 2.4501 3.0105 3.5709 A\(expm(A)-eye(3)) Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.541976e-18. ans = 1.0e+07 * -1.0137 -1.1226 -1.1266 2.0570 2.2815 2.2963 -0.9961 -1.1010 -1.1010 % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); stiff diary off