MATLAB Command Window
MATLAB Command Window
[V,D,W] = eig(A) also produces a full matrix W whose columns are the
corresponding left eigenvectors so that W'*A = D*W'.
[V,D,W] = eig(A,B) also produces a full matrix W whose columns are the
corresponding left eigenvectors so that W'*A = D*W'*B.
>> A = [1 2 3 ; 4 5 6 ; 7 8 9 ]
A =
1 2 3
4 5 6
7 8 9
>> exp A
Check for incorrect argument data type or missing argument in call to function
'exp'.
ans =
1.0e+03 *
2/27/23 7:48 PM MATLAB Command Window 3 of 9
ans =
1.0e+06 *
>> eig(A)
ans =
16.1168
-1.1168
-0.0000
>> VP=eig(A)
VP =
16.1168
-1.1168
-0.0000
V1 =
V2 =
16.1168 0 0
0 -1.1168 0
0 0 -0.0000
>> m=V1
m =
>> Ad=(1/m)*A*m
Error using /
Matrix dimensions must agree.
>> Ad=m^-1*A*m
Ad =
b =
1.0e+06 *
c =
1.0e+06 *
>> Ae=m*Ad*m^-1
Ae =
>> Aa=m*Ad*m^-1
Aa =
>> Ae=m^-1*Ad*m
Ae =
>> eig(Ae)
ans =
16.1168
-0.0000
-1.1168
>> eig(exp(A))
ans =
1.0e+03 *
8.2542
0.0000
0.0000
>> eig(exp(Ae))
ans =
1.0e+05 *
1.0921
0.0000
0.0001
>> eig(Ad)
ans =
16.1168
0
-1.1168
>> eig(Aa)
ans =
16.1168
-1.1168
-0.0000
>> eig(Ae)
ans =
16.1168
-0.0000
2/27/23 7:48 PM MATLAB Command Window 6 of 9
-1.1168
>> T=random(3)
'random' requires Statistics and Machine Learning Toolbox.
>> T=random(3)
'random' requires Statistics and Machine Learning Toolbox.
>> T=rand(3)
T =
>> A2=T^-1*A*T
A2 =
ans =
16.1168
-0.0000
-1.1168
ans =
-9.5162e-16
>> ctrb(a)
Unrecognized function or variable 'a'.
>> B= [1 2 3]
B =
1 2 3
>> B= [1 ;2 ;3]
2/27/23 7:48 PM MATLAB Command Window 7 of 9
B =
1
2
3
Q =
1 14 228
2 32 516
3 50 804
>> det(Q)
ans =
-1.0658e-14
>> rang Q
Unrecognized function or variable 'rang'.
>> rand Q
Error using rand
CLASSNAME input must be a class that supports RAND, for example, 'single' or
'double'.
>> rank Q
Error using svd
First input must be single or double.
ans =
ans =
>> b=[1 0 ;2 1 ;3 3]
b =
1 0
2 1
3 3
Q =
1 0 14 11 228 162
2 1 32 23 516 369
3 3 50 35 804 576
>> det(Q)
Error using det
Matrix must be square.
>> Q1=ctrb(A,B)
Q1 =
1 14 228
2 32 516
3 50 804
>> Q1=ctrb(A;B)
Q1=ctrb(A;B)
↑
Invalid expression. When calling a function or indexing a variable, use
parentheses. Otherwise, check
for mismatched delimiters.
>> Q1=ctrb(A,B)
Q1 =
1 14 228
2 32 516
2/27/23 7:48 PM MATLAB Command Window 9 of 9
3 50 804
>> Q1=ctrb(A,b)
Q1 =
1 0 14 11 228 162
2 1 32 23 516 369
3 3 50 35 804 576
>> c=eye(3)
c =
1 0 0
0 1 0
0 0 1
>> obsv(A,c)
ans =
1 0 0
0 1 0
0 0 1
1 2 3
4 5 6
7 8 9
30 36 42
66 81 96
102 126 150
S =
1 0 0 1 2 3 30 36 42
0 1 0 4 5 6 66 81 96
0 0 1 7 8 9 102 126 150
ans =
15
>>