Is it possible to adjust dsp.ColoredNoise to limit the filter length?

3 visualizaciones (últimos 30 días)
Neil Bailey
Neil Bailey el 29 de Jul. de 2023
Respondida: Pratyush el 2 de Ag. de 2023
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?

Respuestas (1)

Pratyush
Pratyush el 2 de Ag. de 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');

Categorías

Más información sobre Signal Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by