Hello. I'm currently involved in the project named "LIDAR signal Processing using autocorrelation'. I'm asked to find the spectrum of autocorrelated noisy sinusoidal signal and pulse signals. Help me with the matlab code for this problem.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
close all; clear all; clc; f = 1000; % Hz - Signal Frequency N = 1; % Number of cycles fs = 100000*f; % Hz - Sampling Frequency T = 1/f; % Signal Period t = linspace(0, T*N , N*T*fs); x = sin(2*pi*t/T); noisy_x = x + 0.5*randn(size(x)); subplot(3,1,1); plot(t,x); title('Sine signal'); [y,lags]=xcorr(noisy_x,'coeff'); subplot(3,1,2); plot(t,noisy_x); title('Noisy signal'); l = length(lags); y1 = fftshift(fft(y,l)); my1 = abs(y1)/l; if mod(l,2)==0 f = (-l/2:l/2-1)*fs/l; else f = (-(l-1)/2:(l-1)/2)*fs/l; end display(size(f)); display(size(my1)); subplot(3,1,3); plot(f,my1); title('Autocorrelation spectrum'); grid on; grid minor;
I'm getting the spectrum at the centre only. But, i want it to be present at the particular frequency component.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur ECG / EKG dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!