Derivative of a vector

조회 수: 5 (최근 30일)
Nikolaos Zafirakis
Nikolaos Zafirakis 2019년 4월 15일
답변: Walter Roberson 2019년 4월 15일
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
madhan ravi
madhan ravi 2019년 4월 15일
Instead of riddling readers show how your x looks like.
Nikolaos Zafirakis
Nikolaos Zafirakis 2019년 4월 15일
my x is time (t)

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2019년 4월 15일
USe gradient

추가 답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 15일
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.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by