%% example showing how to use the function F_simulate_system_HW6 clear all noise_variance = 0.01; %0.5; %% sampling period T = 1e-3; % max input freq (in Hz) allowed that does not cause aliasing F_max = 1/2 1/T %test input - sinousoid at some freq lower than F_max 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_HW6b(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');