MATLAB Command Window

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MATLAB Command Window

>> A= [34 -25; -15 24]


A =
34
-15

-25
24

>> B= [-15 -25; -15 -25]


B =
-15
-15

-25
-25

>> C=A*B
C =
-135
-135

-225
-225

>> D= [25 -25; -15 15]


D =
25
-15

-25
15

>> E=A*D
E =
1225
-735

-1225
735

>> [cos3t cos3t; cos4t cos2t]


Undefined function or variable 'cos3t'.
Did you mean:
>> [cost cost; cost cost]
Undefined function or variable 'cost'.
>> [cos(3t) cos(4t); cos(5t) cos(6t)]
[cos(3t) cos(4t); cos(5t) cos(6t)]
|
Error: Unexpected MATLAB expression.
>> Exam
Error: File: Exam.m Line: 19 Column: 9
The input character is not valid in MATLAB statements or expressions.

Page 1

MATLAB Command Window

Page 2

>> Exam
The exponential of At is
expAt =
[
2*exp(2*t) - exp(t), 3*exp(t) - 3*exp(2*t),
4*exp(t) - 4*exp(2*t)]
[ 6*exp(2*t) - 6*exp(t), 10*exp(t) - 9*exp(2*t), 12*exp(t) - 12*exp(2*t)]
[ 4*exp(t) - 4*exp(2*t), 6*exp(2*t) - 6*exp(t),
8*exp(2*t) - 7*exp(t)]

The exponential of Bt is
expBt =
[
exp(2*t) - 3*t*exp(t), exp(t) - exp(2*t),
exp(t) - exp(2*t) + 3*t*exp(t)]
[
exp(t) - exp(2*t),
exp(2*t),
exp(2*t) - exp(t)]
[ exp(2*t) - exp(t) - 3*t*exp(t), exp(t) - exp(2*t), 2*exp(t) - exp(2*t) + 3*t*exp(t)]

The exponential of Ct is
expCt =
[
exp(2*t) - t*exp(t),
exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[ exp(2*t) - exp(t) - t*exp(t), 2*exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[
exp(t) - exp(2*t),
exp(2*t) - exp(t),
exp(2*t)]

Verifying for A
ans =
1

Verifying for B
ans =
1

Verifying for C
ans =
1

MATLAB Command Window

Page 3

>> Exam
The exponential of At is
expAt =
[ exp(t*(- 2 - 3*i))*(1/2 + (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 - (2*i)/3),
(exp(t*(- 2 - 3*i))*5*i)/6 - (exp(t*(- 2 + 3*i))*5*i)/6, (28*exp(2*t))/25 + exp(t*(- 2 3*i))*(- 14/25 - (29*i)/50) + exp(t*(- 2 + 3*i))*(- 14/25 + (29*i)/50)]
[
- (exp(t*(- 2 - 3*i))*5*i)/6 + (exp(t*(- 2 + 3*i))*5*i)/6, exp(t*(- 2 3*i))*(1/2 - (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 + (2*i)/3),
- exp(2*t)/5 +
exp(t*(- 2 - 3*i))*(1/10 + (4*i)/5) + exp(t*(- 2 + 3*i))*(1/10 - (4*i)/5)]
[
0,
0,
exp(2*t)]

The exponential of Bt is
expBt =
[
exp(2*t) - 3*t*exp(t), exp(t) - exp(2*t),
exp(t) - exp(2*t) + 3*t*exp(t)]
[
exp(t) - exp(2*t),
exp(2*t),
exp(2*t) - exp(t)]
[ exp(2*t) - exp(t) - 3*t*exp(t), exp(t) - exp(2*t), 2*exp(t) - exp(2*t) + 3*t*exp(t)]

The exponential of Ct is
expCt =
[
exp(2*t) - t*exp(t),
exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[ exp(2*t) - exp(t) - t*exp(t), 2*exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[
exp(t) - exp(2*t),
exp(2*t) - exp(t),
exp(2*t)]

Verifying for A
ans =
1

Verifying for B
ans =
1

Verifying for C

MATLAB Command Window

Page 4

ans =
1

>> Exam
The exponential of At is
expAt =
[ exp(t*(- 2 - 3*i))*(1/2 + (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 - (2*i)/3),
(exp(t*(- 2 - 3*i))*5*i)/6 - (exp(t*(- 2 + 3*i))*5*i)/6, (4*exp(2*t))/5 + exp(t*(- 2 3*i))*(- 2/5 - (8*i)/15) + exp(t*(- 2 + 3*i))*(- 2/5 + (8*i)/15)]
[
- (exp(t*(- 2 - 3*i))*5*i)/6 + (exp(t*(- 2 + 3*i))*5*i)/6, exp(t*(- 2 3*i))*(1/2 - (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 + (2*i)/3),
(exp(t*(- 2 - 3*i))*2*i)/3 - (exp(t*(- 2 + 3*i))*2*i)/3]
[
0,
0,
exp(2*t)]

The exponential of Bt is
expBt =
[
exp(2*t) - 3*t*exp(t), exp(t) - exp(2*t),
exp(t) - exp(2*t) + 3*t*exp(t)]
[
exp(t) - exp(2*t),
exp(2*t),
exp(2*t) - exp(t)]
[ exp(2*t) - exp(t) - 3*t*exp(t), exp(t) - exp(2*t), 2*exp(t) - exp(2*t) + 3*t*exp(t)]

The exponential of Ct is
expCt =
[
exp(2*t) - t*exp(t),
exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[ exp(2*t) - exp(t) - t*exp(t), 2*exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[
exp(t) - exp(2*t),
exp(2*t) - exp(t),
exp(2*t)]

Verifying for A
ans =
1

Verifying for B

MATLAB Command Window

Page 5

ans =
1

Verifying for C
ans =
1

>> Exam
The exponential of At is
expAt =
[
2*exp(2*t) - exp(t), 3*exp(t) - 3*exp(2*t),
4*exp(t) - 4*exp(2*t)]
[ 6*exp(2*t) - 6*exp(t), 10*exp(t) - 9*exp(2*t), 12*exp(t) - 12*exp(2*t)]
[ 4*exp(t) - 4*exp(2*t), 6*exp(2*t) - 6*exp(t),
8*exp(2*t) - 7*exp(t)]

The exponential of Bt is
expBt =
[
exp(2*t) - 3*t*exp(t), exp(t) - exp(2*t),
exp(t) - exp(2*t) + 3*t*exp(t)]
[
exp(t) - exp(2*t),
exp(2*t),
exp(2*t) - exp(t)]
[ exp(2*t) - exp(t) - 3*t*exp(t), exp(t) - exp(2*t), 2*exp(t) - exp(2*t) + 3*t*exp(t)]

The exponential of Ct is
expCt =
[
exp(2*t) - t*exp(t),
exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[ exp(2*t) - exp(t) - t*exp(t), 2*exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[
exp(t) - exp(2*t),
exp(2*t) - exp(t),
exp(2*t)]

Verifying for A
ans =
1

Verifying for B

MATLAB Command Window

Page 6

ans =
1

Verifying for C
ans =
1

>> Exam
The exponential of At is
expAt =
[ exp(t*(- 2 - 3*i))*(1/2 + (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 - (2*i)/3),
(exp(t*(- 2 - 3*i))*5*i)/6 - (exp(t*(- 2 + 3*i))*5*i)/6, (28*exp(2*t))/25 + exp(t*(- 2 3*i))*(- 14/25 - (29*i)/50) + exp(t*(- 2 + 3*i))*(- 14/25 + (29*i)/50)]
[
- (exp(t*(- 2 - 3*i))*5*i)/6 + (exp(t*(- 2 + 3*i))*5*i)/6, exp(t*(- 2 3*i))*(1/2 - (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 + (2*i)/3),
- exp(2*t)/5 +
exp(t*(- 2 - 3*i))*(1/10 + (4*i)/5) + exp(t*(- 2 + 3*i))*(1/10 - (4*i)/5)]
[
0,
0,
exp(2*t)]

The exponential of Bt is
expBt =
[
exp(2*t) - 3*t*exp(t), exp(t) - exp(2*t),
exp(t) - exp(2*t) + 3*t*exp(t)]
[
exp(t) - exp(2*t),
exp(2*t),
exp(2*t) - exp(t)]
[ exp(2*t) - exp(t) - 3*t*exp(t), exp(t) - exp(2*t), 2*exp(t) - exp(2*t) + 3*t*exp(t)]

The exponential of Ct is
expCt =
[
exp(2*t) - t*exp(t),
exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[ exp(2*t) - exp(t) - t*exp(t), 2*exp(t) - exp(2*t) + t*exp(t), exp(t) - exp(2*t)]
[
exp(t) - exp(2*t),
exp(2*t) - exp(t),
exp(2*t)]

Verifying for A
ans =

MATLAB Command Window

Page 7

Verifying for B
ans =
1

Verifying for C
ans =
1

>> Exam
The exponential of At is
expAt =
[ exp(t*(- 2 - 3*i))*(1/2 + (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 - (2*i)/3),
(exp(t*(- 2 - 3*i))*5*i)/6 - (exp(t*(- 2 + 3*i))*5*i)/6, (28*exp(2*t))/25 + exp(t*(- 2 3*i))*(- 14/25 - (29*i)/50) + exp(t*(- 2 + 3*i))*(- 14/25 + (29*i)/50)]
[
- (exp(t*(- 2 - 3*i))*5*i)/6 + (exp(t*(- 2 + 3*i))*5*i)/6, exp(t*(- 2 3*i))*(1/2 - (2*i)/3) + exp(t*(- 2 + 3*i))*(1/2 + (2*i)/3),
- exp(2*t)/5 +
exp(t*(- 2 - 3*i))*(1/10 + (4*i)/5) + exp(t*(- 2 + 3*i))*(1/10 - (4*i)/5)]
[
0,
0,
exp(2*t)]

Verifying for A
ans =
1

>>

You might also like