I need to differentiate alpha w.r.t time (da/dt) where alpha is a 19*1 matrix and time is 19*6 matrix and i tried using diff(a,t) but getting an error that difference order must be a positive scalar integer. When using diff(a)/diff(t), i'm getting a 18*6 matrix but i need a 19*6 matrix as answer.

 채택된 답변

Star Strider
Star Strider 2021년 3월 21일

0 개 추천

Experiment with the gradient function. It may do what you want, although to take the gradient (in this context, numeric spatial derivative) of a matrix, it will be necessary to request the correct result from the two outputs it will provide.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

질문:

2021년 3월 21일

답변:

2021년 3월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by