%sigpwgn_kf1.m display('Running...sigpwgn_kf1...'); clear; Ts=0.015; %sample time t = 0:Ts:10 ; % Time vector u = sin(7*t); % Signal %add white gaussian noise sigma=0.2; L=length(u); n=randn(1,L); y=u+sigma*n; %signal plus noise %plot time domain figure; subplot(2,1,1) plot(t,y), title('signal - time domain'); %FFT ffty = fft(y); % Compute DFT of y my = abs(ffty); py = unwrap(angle(ffty)); % Magnitude and phase f = (0:length(ffty)-1)/length(ffty); % Frequency vector subplot(2,1,2) plot(f,my); title('signal - frequency domain'); display('...Kalman filtering...'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %enter your matlab code below