VERY basic generator question!

5 次查看(过去 30 天)
andytodd.msp
andytodd.msp 2016-11-5
评论: andytodd.msp 2016-11-12
Morning all - hope you are well!
I'm new to matlab / simulink, and am trying to build a very basic script to output 30 seconds of pink noise.
I seem to have it working (almost) but can't find a way to increase the output time - currently the output lasts for around a second or so.
I've tried altering the sampling and output parameters in the simulink objects, but that doesn't seem to help.
I'm sure its something incredibly simple, but if somebody can point me in the right direction it would be brilliant!
I'm running 2015b on a mac.
Thanks in advance!

回答(1 个)

Kushagr Gupta
Kushagr Gupta 2016-11-9
Any type of noise (for example pink noise) can be generated either programmatically or with the help of Simulink blocks.
If you are looking for a programmatic way to incorporate pink noise into your script, I would recommend going through the following link which talks abut the same:
If a simulink block is what you are looking for to generate pink noise there is a block which helps to generate colored noise and pink-noise is one of the options. The following link explains this block and how it can be configured:
Hope this helps!
  1 个评论
andytodd.msp
andytodd.msp 2016-11-12
Thanks a lot for the help - I've tried the coloured noise object, but now I'm getting the error message
"Error in 'untitled/To Audio Device': The internal buffer size must be less than or equal to two seconds times the current sample rate. Either increase the device sample rate or reduce the number of samples in the internal buffer. The easiest way to do this is to select the 'Automatically determine internal buffer size' check box."
I still get it with the 'Automatically determine internal buffer size' checked.
Any ideas?
Andy

请先登录,再进行评论。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by