Symbolic Math Example
Copyright 2020 The MathWorks, Inc.
syms theta
f = sin(theta)
f =
df = diff(f,theta)
df =
fplot(f)
hold on
fplot(df)
hold off
a = [cos(theta), -sin(theta),0,0
sin(theta),cos(theta),0,0
0,0,1,0
0,0,0,1]
a =
b = [1,0,0,0
0,0,-1,0
0,1,0,0
0,0,0,1]
b = 4x4
1 0 0 0
0 0 -1 0
0 1 0 0
0 0 0 1
a*b
ans =