| Author |
Message |
m_pourfathi
Joined: 07 Feb 2008 Posts: 174 Helped: 9
|
25 Jun 2008 11:56 filter simulation |
|
|
|
Hi all,
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,
M
|
|
| Back to top |
|
 |
AdvaRes
Joined: 14 Feb 2008 Posts: 551 Helped: 27
|
25 Jun 2008 12:03 Re: filter simulation |
|
|
|
| m_pourfathi wrote: |
Hi all,
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,
M |
You can find in the Matlab's library a random signal generator.
|
|
| Back to top |
|
 |
m_pourfathi
Joined: 07 Feb 2008 Posts: 174 Helped: 9
|
25 Jun 2008 12:18 Re: filter simulation |
|
|
|
| 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
|
|
| Back to top |
|
 |
AdvaRes
Joined: 14 Feb 2008 Posts: 551 Helped: 27
|
25 Jun 2008 12:26 Re: filter simulation |
|
|
|
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 !
|
|
| Back to top |
|
 |
senaydud
Joined: 23 Jun 2008 Posts: 121 Helped: 25
|
28 Jun 2008 17:54 Re: filter simulation |
|
|
|
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,
|
|
| Back to top |
|
 |
m_pourfathi
Joined: 07 Feb 2008 Posts: 174 Helped: 9
|
28 Jun 2008 18:59 Re: filter simulation |
|
|
|
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
|
|
| Back to top |
|
 |