I have a tapped delay line digital filter. I have the filter coefficients. I need to simulate it in matlab. how can I do this? I need a random input.
regards,
I have a tapped delay line digital filter. I have the filter coefficients. I need to simulate it in matlab. how can I do this? I need a random input.
regards,
actually my problem is how to define a tapped delay line in matlab? I need an m-file. if anyone can kindly send a sample code that'll be really helpful. thanks
I thougth you are using simulink.
Matlab has a random function that you can use it directly.( Generaly used to introduce noise).
Google it and you'll find a lot of exemples !
Hi m_pourfathi, my answer most probably will not meet what you need, but let me answer;
matlab has a function called "filter", if you have your filter coefficients as;
f_c = [ 0.7 1 2 4 0.3];
then create a random input like;
i_p = randn(1,100);
then filter the random input through the filter and get the output;
o_p = filter(f_c,1, i_p);
I hope it helps,
yeah that was pretty much what I needed I've used it before now you tell me. it's been a while I haven't used matlab. thanks for reminding me the formula