%%%%% Demo code to show how to run simulink files
%%%%% Set parameters and play with them

%%%%% Open simulink file
L4_sim_ol_first

T = 100; %%% end time for simulation
w = 0.1; %%% frequency of injected sine wave
z = 0.1; %%% damping ratio


while w < 10,
    w = 1.1 * w;
    sim('L4_sim_ol_first')
    figure(1)
    plot(t,u,t,y)
    title(['w = ' num2str(w)])
    axis([0 T -2 2])
    disp('hit return to increase w')
    pause
end


