Is it possible to adjust dsp.ColoredNoise to limit the filter length?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to simulate a range of approximately pink noise (with variations in the slope of the 1/f power-frequency distribution), but without multiple oscillatory cycles in the signal.
Using dsp.ColoredNoise to create the ~pink noise results in 3+ cycles in the data at a range of frequencies, which I think could be resolved by reducing the filter length that dsp.ColoredNoise uses to the create the noise. However, I can't find a setting to reduce the filter length.
Does anyone know how to reduce the filter length used by dsp.ColoredNoise, or an alternative method to create pink noise that doesn't result in cycles of longer than 1 cycle in the data?
0 Kommentare
Antworten (1)
Pratyush
am 2 Aug. 2023
I understand that you want to reduce the filter length used by "dsp.ColoredNoise" generate pink noise without multiple oscillatory cycles in signal. There is no direct way to reduce the filter length used to create the noise. However, you can use the 'pinknoise' function from the Signal Processing Toolbox, which generates pink noise with a 1/f power spectrum. This function allows you to specify the length of the generated noise directly, which can help avoid the issue of longer cycles. Here's an example of how you can use it:
fs = 1000; % Sampling rate
t = 0:1/fs:10; % Time vector
L = length(t); % Length of the signal
noise = pinknoise(L); % Generate pink noise
% Plot the generated noise
plot(t, noise);
xlabel('Time (s)');
ylabel('Amplitude');
title('Pink Noise');
0 Kommentare
Siehe auch
Kategorien
Mehr zu Signal Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!