필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Neil Bailey
Neil Bailey 2023년 7월 29일
답변: Pratyush 2023년 8월 2일
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?

답변 (1개)

Pratyush
Pratyush 2023년 8월 2일
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');

카테고리

Help CenterFile Exchange에서 Digital Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by