필터 지우기
필터 지우기

Cannot find the derivative of a function in terms of time

조회 수: 1 (최근 30일)
So I have a function lets say B=a*cos(q), where a is a constant and q is an articulation angle.
Now to find the velocity I wrote diff(B,t), so it will differentiate it in terms of time, but it doesnt work, it results 0 , if I replace q with q(t) it returns an error because it thinks Im indexing.
How should I write this to calculate the derivative of B in terms of time ?

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022년 12월 24일
syms q(t) t a
diff(a*cos(q))
ans(t) = 
  댓글 수: 2
Spulber Alexandru
Spulber Alexandru 2022년 12월 24일
Thank you very much.
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022년 12월 24일
Most welcome! It is my pleasure! Merry Christmas!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by