function xdot = xdot_bk(t,x,etc) % % find xdot given t,x % etc contaings [b k load_type period amplitude] % load_type is 1, 2 or 3 % period is for load_type 2 or 3 % amplitude of load % b = etc(1); k = etc(2); load_type = etc(3); amp = etc(5); switch load_type case 1 %% constant load F = amp; case 2 %% sine wave period = etc(4); omega = %% FINISH THIS F = %% FINISH THIS case 3 %% square wave period = etc(4); F = sqwave(t,period,amp); end xdot = %% FINISH THIS