Denoising the sinusoidal signal
1 view (last 30 days)
Show older comments
Can you help my question?
0 Comments
Answers (1)
Image Analyst
on 15 May 2021
Yeah, most likely we can help. Read this link first.
Here's a start on the code. See if you can finish it.
% Figure out how many samples you need at a sampling rate of 5 kHz to get 50 ms.
numSamples = your computations....
t = linspace(0, 50, numSamples) % Units are milliseconds
x = sin(2 * pi * 100 * t) + 0.7 * cos(2 * pi * 500 * t);
xn = x + sigma * randn(........)
originalSpectrum = fft(x); % Get spectrum of original signal.
noisySpectrum = ...............% Get spectrum of noisy signal.
subplot(2, 1, 1);
plot(abs(originalSpectrum), 'b-', 'LineWidth', 2);
grid on;
xlabel('t');
ylabel('x');
subplot(2, 1, 2);
0 Comments
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!