Rotational motion modelling in Matlab

5 visualizaciones (últimos 30 días)
Bhabani Nayak
Bhabani Nayak el 16 de Nov. de 2015
Respondida: Subhra Saha el 18 de Nov. de 2015
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??

Respuestas (1)

Subhra Saha
Subhra Saha el 18 de Nov. de 2015
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:

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by