?? equations.m
字號(hào):
% M-file name: equations.m
% M-file type: Function file
% This function file obtains suspension forces and moments from function file
%'wheelset_suspension.m' and uses them to solve the single wheelset dynamic equations by
% invoking the function 'wheelset' .
% At the end of the simulation, MATLAB stores each degree of freedom as a column array and
% the entire solution as a matrix. The solution matrix in this program has been named 'x'.
% Hence, in this case, the solution matrix 'x' will have 6 columns. The number of rows of 'x'
% will be equal to the total number of time steps required for the simulation. Throughout this
% function file, the six degrees of freedom at any particular time step are denoted as:
% x(1): Lateral Displacement of wheelset
% x(2): Yaw Displacement of wheelset
% x(3): Lateral Velocity of wheelset
% x(4): Yaw Velocity of wheelset
% x(5): Lateral Displacement of Left Rail
% x(6): Lateral Displacement of Right Rail
% where x(n) represents the nth column of the solution matrix 'x'.
% The vector of time-derivatives within any time step for the solution vector 'x' has been
% named 'xdot'. Hence, the time-derivative of variable x(n) would be xdot(n).
% Nomenclature:
% Fsuspyw: Lateral suspension force on the wheelset
% Msuspzw: Vertical suspension moment on the wheelset
% phi: Wheelset roll angle
function [xdot]=equations(t,x)
% Initializing the vector of time-derivatives
xdot=zeros(6,1);
% Printing time at end of each time-step on the command screen
t
% Obtaining wheelset suspension forces and moments from function
% 'wheelset_suspension'
[Fsuspyw,Msuspzw] = wheelset_suspension(x(1),x(3),x(2),x(4));
% Invoking function 'wheelset' to solve for wheelset response at each time-step
[xdot(1),xdot(2),xdot(3),xdot(4),xdot(5),xdot(6),phi]=wheelset(x(1),x(2),x(3),x(4),x(5),x(6),Fsuspyw,Msuspzw);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -