%% example showing how to use the function F_simulate_system_HW6 clear all clear all; noise_variance = 0; %0.5; %% sampling period T = 1e-3; % max input freq (in Hz) allowed that does not cause aliasing = 1/2 1/T f_Hz = 39; Omega = 2*pi*f_Hz*T; time_final_seconds = 10; d_inds = [1:1:round(time_final_seconds/T)]'; alpha = 1; u_signal = alpha*sin(Omega*d_inds); y_meas = F_simulate_system_HW6(T,u_signal,noise_variance); figure; subplot(211); plot(d_inds,y_meas,'b.-'); xlabel('k'); ylabel('y'); subplot(212); time_in_secs = d_inds*T; plot(time_in_secs,y_meas,'b.-'); xlabel('sec');ylabel('y');