MATLAB Answers

0

Derivative of a vector

Asked by Nikolaos Zafirakis on 15 Apr 2019
Latest activity Answered by Walter Roberson
on 15 Apr 2019
Accepted Answer by KSSV
I have a vector 3x1 which I multiply by a 3x3 matrix and get a solution (this is all done in a function). I take the resulting 3x1 vector out of the function, then I need to compute the derivative of this vector. Once I find the derivative I can return it to the function.
I tried the diff(x) command but it errors every time does anyone have any suggestions?

  4 Comments

Show 1 older comment
It's got symbolic and numerical terms, I am looking to get the analytical solution. I would like with respect to time. Thanks in advance!
madhan ravi
on 15 Apr 2019
Instead of riddling readers show how your x looks like.
my x is time (t)

Sign in to comment.

2 Answers

KSSV
Answer by KSSV
on 15 Apr 2019
 Accepted Answer

USe gradient

  0 Comments

Sign in to comment.


Walter Roberson
Answer by Walter Roberson
on 15 Apr 2019

Take the derivative of the elements of the vector. Now each row of the matrix gives the mixing coefficients to combine the three derivatives.
Note that this does not apply if the matrix contains the variable that you are taking the derivative with respect to.

  0 Comments

Sign in to comment.