How to take derivatives of this function?

3 views (last 30 days)
Bokun Zhang
Bokun Zhang on 22 Sep 2016
Commented: Jan on 22 Sep 2016
f=sin(a)+cos(b)+a_dot where a and b are 2 angles, a_dot and b_dot are the angular velocity and a_double_dot and b_double_dot are the angular acceleration.
first, take partial derivative of a: df/da=cos(a) then take derivative of df/da w.r.t time t: d(df/da)/dt=-sin(a)*a_dot
Can anyone wrote a code for me to solve this please?
  1 Comment
Jan
Jan on 22 Sep 2016
This sounds like a homework question. So please show, what you have tried so far.

Sign in to comment.

Answers (1)

KSSV
KSSV on 22 Sep 2016
syms t a_dot(t)
a(t) = sym('a(t)') ;
b(t) = sym('b(t)') ;
f = sin(a(t))+cos(b(t))+a_dot ;
f_a = functionalDerivative(f,a(t)) ;
diff(f_a,t)

Categories

Find more on Programming 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!