Rotational motion modelling in Matlab

5 次查看(过去 30 天)
I want to model the following two equations in matlab, but i don't know what is the correct procedure to do it. Any form of suggestion would be helpful.
I want to model this for the following speed profile.
%Ref - NicolaSysnet
v = [20*ones(1,50*1e4) 20*2.^(-(1:(50*1e4))/(50*1e4)) 10+20/(50*1e4)*(1:(50*1e4)) 30*ones(1,50*1e4)];
plot(v)
disp('Velocity 72kph exponentially decreasing to 36kph then linearly increasing to 144kph')
pause
x = cumsum(v)/1e4;
theta = x / R;
How should i proceed to model these two equations??

回答(1 个)

Subhra Saha
Subhra Saha 2015-11-18
You can convert the equations into a system of first order equations and then use the ODE45 solver to solve the equations. If this solver does not solve the equations, you can use the other solvers like ode23, ode113.
Please refer to the link below for more information: http://www.mathworks.com/help/matlab/ref/ode45.html
Also you can use dsolve to model these equations, but you would need the Symbolic Math Toolbox for this purpose and it can be slower too as compared to ode45 solvers. For more information on dsolve, refer to the link below:

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by