| Author |
Message |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
28 Apr 2009 16:09 i need matlab help |
|
|
|
|
can anybody help me in making bandpass filter which will pass frequencies between 925 to 970 Mhz , and after that pass a square wave in this filter and then check the output frequencies(using FFT) and plot the output waveform???
Thanks
|
|
| Back to top |
|
 |
Aya2002
Joined: 12 Dec 2006 Posts: 1409 Helped: 254 Location: Iraq
|
28 Apr 2009 23:17 matlab square wave code |
|
|
|
|
| hay did you checked on matlab file center?
|
|
| Back to top |
|
 |
Communications_Engineer
Joined: 10 Oct 2008 Posts: 492 Helped: 39
|
29 Apr 2009 4:35 generate square wave matlab |
|
|
|
|
so whats the problem... if your are good at Matlab you can use the fir1 command to design a bandpass filter. Then create a square wave signal and use the filter command to take the output. To get the frequency response you can use the fft command.
If not you are not that good, design the filter using FDAtool, export it to Simulink or Matlab and generate a square wave there and find the frequency domain response.
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
29 Apr 2009 4:52 matlab filtering an input square wave |
|
|
|
|
| Communications_Engineer wrote: |
so whats the problem... if your are good at Matlab you can use the fir1 command to design a bandpass filter. Then create a square wave signal and use the filter command to take the output. To get the frequency response you can use the fft command.
If not you are not that good, design the filter using FDAtool, export it to Simulink or Matlab and generate a square wave there and find the frequency domain response. |
but when i take fft it shows some odds lines and the real frequency response!!!
|
|
| Back to top |
|
 |
Communications_Engineer
Joined: 10 Oct 2008 Posts: 492 Helped: 39
|
29 Apr 2009 5:12 bandpass filter odd order fdatool |
|
|
|
|
yeah... I know.... from what you just wrote I imagine you are a rookie. Any way, let me explain.... The fft will give you discrete points in complex frequency (complex only due to the presence of the in-phase and the quadrature component at the same time). Now, if you want to have the frequency response (magnitude) then try this
plot(20*log10(abs(fft(y,2048))));
where y = h*x (which you get by using the filter command)
If this still doesn't work.... or you don't understand then put your code here, I'll point out the place where your are going wrong
Like ramyaravi says, "Happy Learning!"
------------------------------------------------------------
groups.yahoo.com/group/telecom_research
|
|
| Back to top |
|
 |
xulfee
Joined: 27 May 2008 Posts: 434 Helped: 32 Location: Pakistan
|
29 Apr 2009 6:48 generate square signal in matlab |
|
|
|
|
| use fdatool n give ur specification there
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
29 Apr 2009 7:22 need help to put codes in matlab |
|
|
|
|
| Communications_Engineer wrote: |
yeah... I know.... from what you just wrote I imagine you are a rookie. Any way, let me explain.... The fft will give you discrete points in complex frequency (complex only due to the presence of the in-phase and the quadrature component at the same time). Now, if you want to have the frequency response (magnitude) then try this
plot(20*log10(abs(fft(y,2048))));
where y = h*x (which you get by using the filter command)
If this still doesn't work.... or you don't understand then put your code here, I'll point out the place where your are going wrong
Like ramyaravi says, "Happy Learning!"
------------------------------------------------------------
groups.yahoo.com/group/telecom_research |
here is my code:
In Attachment.
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
29 Apr 2009 7:24 matlab continuous wave signal generation |
|
|
|
|
| xulfee wrote: |
| use fdatool n give ur specification there |
how to input square wave in the filter we got from fdatool.
|
|
| Back to top |
|
 |
Communications_Engineer
Joined: 10 Oct 2008 Posts: 492 Helped: 39
|
29 Apr 2009 7:53 export wave frequency matlab |
|
|
|
|
| bt87 wrote: |
| xulfee wrote: |
| use fdatool n give ur specification there |
how to input square wave in the filter we got from fdatool. |
Export your filter from FDAtool to simulink. In Simulink, use the signal generator option to create the square wave. To look at the output in time domain use the"time scope" from the Sinks of the Signal Processing Blockset and for frequency domain use the "spectrum scope", again from the Sinks of the Signal Processing Blockset
One word of advice, you would have been better off putting your code here directly rather than putting in a file to be downloaded. Most people will not download a file that is useless to them and then read and upload it back with corrections. I hope you understand.
How are you xulfee, I'm waiting for you to answer my question on DSP
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
29 Apr 2009 8:05 matlab frequency response of square wave input |
|
|
|
|
| Communications_Engineer wrote: |
| bt87 wrote: |
| xulfee wrote: |
| use fdatool n give ur specification there |
how to input square wave in the filter we got from fdatool. |
Export your filter from FDAtool to simulink. In Simulink, use the signal generator option to create the square wave. To look at the output in time domain use the"time scope" from the Sinks of the Signal Processing Blockset and for frequency domain use the "spectrum scope", again from the Sinks of the Signal Processing Blockset
One word of advice, you would have been better off putting your code here directly rather than putting in a file to be downloaded. Most people will not download a file that is useless to them and then read and upload it back with corrections. I hope you understand.
How are you xulfee, I'm waiting for you to answer my question on DSP |
i have uploaded the file plz chk the 3rd last post!!!!
and simulink is giving this error:
"Error reported by S-function 'sdspdelay' in 'Untitled/Filter/BodyLDelay4':
Input to block must have a discrete sample time"
|
|
| Back to top |
|
 |
Google AdSense

|
29 Apr 2009 8:05 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Communications_Engineer
Joined: 10 Oct 2008 Posts: 492 Helped: 39
|
29 Apr 2009 15:14 simulink of matlab help in scope |
|
|
|
|
| bt87 wrote: |
| Communications_Engineer wrote: |
| bt87 wrote: |
| xulfee wrote: |
| use fdatool n give ur specification there |
how to input square wave in the filter we got from fdatool. |
Export your filter from FDAtool to simulink. In Simulink, use the signal generator option to create the square wave. To look at the output in time domain use the"time scope" from the Sinks of the Signal Processing Blockset and for frequency domain use the "spectrum scope", again from the Sinks of the Signal Processing Blockset
One word of advice, you would have been better off putting your code here directly rather than putting in a file to be downloaded. Most people will not download a file that is useless to them and then read and upload it back with corrections. I hope you understand.
How are you xulfee, I'm waiting for you to answer my question on DSP |
i have uploaded the file plz chk the 3rd last post!!!!
and simulink is giving this error:
"Error reported by S-function 'sdspdelay' in 'Untitled/Filter/BodyLDelay4':
Input to block must have a discrete sample time" |
You must be using continuous time input to your filter. Is this your homework or assignment?
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
29 Apr 2009 15:58 matlab magnitude time index wav |
|
|
|
|
| Communications_Engineer wrote: |
| bt87 wrote: |
| Communications_Engineer wrote: |
| bt87 wrote: |
| xulfee wrote: |
| use fdatool n give ur specification there |
how to input square wave in the filter we got from fdatool. |
Export your filter from FDAtool to simulink. In Simulink, use the signal generator option to create the square wave. To look at the output in time domain use the"time scope" from the Sinks of the Signal Processing Blockset and for frequency domain use the "spectrum scope", again from the Sinks of the Signal Processing Blockset
One word of advice, you would have been better off putting your code here directly rather than putting in a file to be downloaded. Most people will not download a file that is useless to them and then read and upload it back with corrections. I hope you understand.
How are you xulfee, I'm waiting for you to answer my question on DSP |
i have uploaded the file plz chk the 3rd last post!!!!
and simulink is giving this error:
"Error reported by S-function 'sdspdelay' in 'Untitled/Filter/BodyLDelay4':
Input to block must have a discrete sample time" |
You must be using continuous time input to your filter. Is this your homework or assignment? |
well you can say that......
plz edit the code i provided and plz implement this on that.....
|
|
| Back to top |
|
 |
Communications_Engineer
Joined: 10 Oct 2008 Posts: 492 Helped: 39
|
30 Apr 2009 4:23 fdatool use filter matlab |
|
|
|
|
| okay I'm busy right now, I'll upload it tonight
|
|
| Back to top |
|
 |
bt87
Joined: 25 May 2008 Posts: 29 Helped: 1
|
30 Apr 2009 13:36 phase response filter simulink |
|
|
|
|
| Communications_Engineer wrote: |
| okay I'm busy right now, I'll upload it tonight |
tnx i vll w8..
|
|
| Back to top |
|
 |