Piston probelm (subprogram source for PC and Mac workstation)

%
%   This is subfunction for ODE45 solver 
%   probelm 3.175
%

function xdot = p3_175s1(t,x)

%
%   State variables
%

x_dot1 = x(2);
x_dot2 = x(3);
x_dot3 = 0;

xdot = [x_dot1; x_dot2; x_dot3];