Angular Acceleration differentation w.r.t to time

Hello everyone,
I want to derivate my simple function w.r.t time to get the acceleration and therefore I use the diff syntax.
I define my variable with q=omega*t but then omega the angular speed is constant.
If I derivate my equation twice with respect to time, I don´t have an angular_acceleration in my acceleration equation. The analytical equation of the acceleration should be f_dot_dot = cos(omega*t)*angular_acceleration - sin(omega*t)*omega^2.
What can I do to get an angular_acceleration?
t = 0:0.01:2*pi; % Time Interval
omega = 2; % Angular speed
q = omega*t; % Angular q
f = sin(q); % Function
f_dot = diff(f)./diff(t); % First derivative w.r.t
f_dot = [f_dot, NaN]; % Vector has the same length as at the beginning
f_dot_dot = diff(f_dot)./diff(t); % Second derivative w.r.t
Best regards
Matthias

4 件のコメント

darova
darova 2019 年 4 月 22 日
f_dot = diff(f)./diff(t);
f_dot_dot = diff(f_dot)./diff(t(2:end));
% or
f_dot_dot = diff(f)./diff(t(2:end)).^2;
mattzoe
mattzoe 2019 年 4 月 22 日
Hello darova,
thanks for your help, but in my case I need the angular acceleration and I dont´t know how do define it.
Best regards
darova
darova 2019 年 4 月 26 日
If the velocity is a constant and acceleration is a change of velocity? How can you have acceleration?
mattzoe
mattzoe 2019 年 4 月 28 日
編集済み: mattzoe 2019 年 4 月 28 日
@darvora that's right. But I don't know how to define my equation to solve it numerically with an included angular acceleration.
I could use the symbolic differentiation to get an angular acceleration (q_dot_dot), but I would prefer the upper one.
syms q(t)
f = sin(q);
f_dot_dot = diff(f,t,2);
f_dot_dot = cos(q)*q_dot_dot - sin(q)*q_dot^2.
Best regards

サインインしてコメントする。

回答 (1 件)

SHABNUR MANSURI
SHABNUR MANSURI 2021 年 4 月 29 日

0 投票

t = 0:0.01:2*pi; % Time Interval
omega = 2; % Angular speed
q = omega*t; % Angular q
f = sin(q); % Function
f_dot = diff(f)./diff(t); % First derivative w.r.t
f_dot = [f_dot, NaN]; % Vector has the same length as at the beginning
f_dot_dot = diff(f_dot)./diff(t); % Second derivative w.r.t

カテゴリ

質問済み:

2019 年 4 月 22 日

回答済み:

2021 年 4 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by