(i)I have designed a band pass filter in matlab using these commands:- n2=200; f2=500; w1=2*95/f2; w2=2*105/f2; wn=[w1 w2]; y2=boxcar(n2+1); hd2=fir1(n2,wn,y2); [h2,o]=freqz(hd2); i want the filter response such that i get a bandwidth of 10MHz centered at frequency 100MHz. But i am getting the center frequency as 200MHz. how to plot the response correctly? (ii) how to plot impulse function at specific frequencies. For eg at [80 85 90 95 ..... 120]
filter design
Started by ●July 3, 2010
Reply by ●July 4, 20102010-07-04
On 7/3/2010 2:30 PM, student28 wrote:> (i)I have designed a band pass filter in matlab using these commands:- > n2=200; > f2=500; > w1=2*95/f2; > w2=2*105/f2; > wn=[w1 w2]; > y2=boxcar(n2+1); > hd2=fir1(n2,wn,y2); > [h2,o]=freqz(hd2); > > i want the filter response such that i get a bandwidth of 10MHz centered at > frequency 100MHz. But i am getting the center frequency as 200MHz. how to > plot the response correctly?Have you considered the possibility that the plot is correct and the design is faulty?> (ii) how to plot impulse function at specific frequencies. For eg at [80 85 > 90 95 ..... 120]What? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 4, 20102010-07-04
>On 7/3/2010 2:30 PM, student28 wrote: >> (i)I have designed a band pass filter in matlab using these commands:- >> n2=200; >> f2=500; >> w1=2*95/f2; >> w2=2*105/f2; >> wn=[w1 w2]; >> y2=boxcar(n2+1); >> hd2=fir1(n2,wn,y2); >> [h2,o]=freqz(hd2); >> >> i want the filter response such that i get a bandwidth of 10MHz centeredat>> frequency 100MHz. But i am getting the center frequency as 200MHz. howto>> plot the response correctly? > >Have you considered the possibility that the plot is correct and the >design is faulty? > >> (ii) how to plot impulse function at specific frequencies. For eg at [8085>> 90 95 ..... 120] > >What? > >Jerry >-- >Engineering is the art of making what you want from things you can get. >??????????????????????????????????????????????????????????????????????? >I got the answer of my second Question but for the first Question why thedesign is faulty. the plot is correct but how to get the correct value on the frequency axis?
Reply by ●July 4, 20102010-07-04
student28 wrote:>> On 7/3/2010 2:30 PM, student28 wrote: >>> (i)I have designed a band pass filter in matlab using these commands:- >>> n2=200; >>> f2=500; >>> w1=2*95/f2; >>> w2=2*105/f2; >>> wn=[w1 w2]; >>> y2=boxcar(n2+1); >>> hd2=fir1(n2,wn,y2); >>> [h2,o]=freqz(hd2); >>> >>> i want the filter response such that i get a bandwidth of 10MHz centered > at >>> frequency 100MHz. But i am getting the center frequency as 200MHz. how > to >>> plot the response correctly? >> >> Have you considered the possibility that the plot is correct and the >> design is faulty? >> >>> (ii) how to plot impulse function at specific frequencies. For eg at [80 > 85 >>> 90 95 ..... 120] >> >> What? >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> ??????????????????????????????????????????????????????????????????????? >> I got the answer of my second Question but for the first Question why the > design is faulty. the plot is correct but how to get the correct value on > the frequency axis?Half the solution is asking "right" question ;) You got part of that right by identifying yourself as a STUDENT. PS - do you know difference between "student" and "pupil"? What is your initial problem? What was your proposed solution? How/Why did it fail? *ALL* responses to be independent of programming language!!! You do understand that FORTRAN, BASIC, matlab etc *are* ALL programming languages. ;/ *LOL*
Reply by ●July 4, 20102010-07-04
On 7/4/2010 12:49 PM, Richard Owlett wrote:> *ALL* responses to be independent of programming language!!! > You do understand that FORTRAN, BASIC, matlab etc *are* ALL > programming languages. ;/ *LOL*The problem is that most teaching in DSP seems to be about teaching how to use Matlab to design or solve a problem. So, without Matlab, a student does not how to design or solve a problem, because they did not learn the theory nor the mathematics itself well. So, for a student of a typical signals and systems course, Matlab IS the subject itself. They can plot system responses, design a filter, do all sorts of things using Matlab commands only. Take Matlab or simulink away, and they are lost. My point is, Matlab is not just a programming language for many. Matlab commands and tools seem to have morphed into the DSP subject itself, so can't separate the two. --Nasser
Reply by ●July 4, 20102010-07-04
On 07/04/2010 04:40 PM, Nasser M. Abbasi wrote:> On 7/4/2010 12:49 PM, Richard Owlett wrote: > >> *ALL* responses to be independent of programming language!!! >> You do understand that FORTRAN, BASIC, matlab etc *are* ALL >> programming languages. ;/ *LOL* > > The problem is that most teaching in DSP seems to be about teaching how > to use Matlab to design or solve a problem. So, without Matlab, a > student does not how to design or solve a problem, because they did not > learn the theory nor the mathematics itself well. > > So, for a student of a typical signals and systems course, Matlab IS the > subject itself. They can plot system responses, design a filter, do all > sorts of things using Matlab commands only. Take Matlab or simulink > away, and they are lost. > > My point is, Matlab is not just a programming language for many. Matlab > commands and tools seem to have morphed into the DSP subject itself, so > can't separate the two.Oh, good. This means that I have a career for as long as I can take messed-up designs and apply _real_ DSP knowledge to them to get them working. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●July 4, 20102010-07-04
On 07/04/2010 04:40 PM, Nasser M. Abbasi wrote:> On 7/4/2010 12:49 PM, Richard Owlett wrote: > >> *ALL* responses to be independent of programming language!!! >> You do understand that FORTRAN, BASIC, matlab etc *are* ALL >> programming languages. ;/ *LOL* > > The problem is that most teaching in DSP seems to be about teaching how > to use Matlab to design or solve a problem. So, without Matlab, a > student does not how to design or solve a problem, because they did not > learn the theory nor the mathematics itself well. > > So, for a student of a typical signals and systems course, Matlab IS the > subject itself. They can plot system responses, design a filter, do all > sorts of things using Matlab commands only. Take Matlab or simulink > away, and they are lost. > > My point is, Matlab is not just a programming language for many. Matlab > commands and tools seem to have morphed into the DSP subject itself, so > can't separate the two.Are you sure that this is the intent, or that this is how the students that post on USENET view it? Certainly when I was learning signals and systems decades ago the 'C' students (and even a few of the 'A' students) would totally fail to grasp the underlying theory, while still being able to make up for this lack by energetically applying the appropriate computations by rote to get the required answers to homework problems. Move forward twenty five years, and you find that doing a Fourier transform by hand has been replaced by tippy-tappy-typing Matlab commands -- but does that mean that it is the instructor's intent to present "Matlab is DSP", or just that there are still the same proportion of students that make it through by rote with no understanding, but that the rote is different than when you were an undergrad? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●July 5, 20102010-07-05
>On 7/3/2010 2:30 PM, student28 wrote: >> (i)I have designed a band pass filter in matlab using these commands:- >> n2=200; >> f2=500; >> w1=2*95/f2; >> w2=2*105/f2; >> wn=[w1 w2]; >> y2=boxcar(n2+1); >> hd2=fir1(n2,wn,y2); >> [h2,o]=freqz(hd2); >> >> i want the filter response such that i get a bandwidth of 10MHz centeredat>> frequency 100MHz. But i am getting the center frequency as 200MHz. howto>> plot the response correctly? > >Have you considered the possibility that the plot is correct and the >design is faulty? > >> > > >Jerry >-- >Engineering is the art of making what you want from things you can get. >??????????????????????????????????????????????????????????????????????? >can anyone plz tell why the design is faulty , although I have got theresponse I wanted correctly.
Reply by ●July 6, 20102010-07-06
On 7/4/2010 5:09 PM, Tim Wescott wrote:> On 07/04/2010 04:40 PM, Nasser M. Abbasi wrote: >> On 7/4/2010 12:49 PM, Richard Owlett wrote: >> >>> *ALL* responses to be independent of programming language!!! >>> You do understand that FORTRAN, BASIC, matlab etc *are* ALL >>> programming languages. ;/ *LOL* >> >> The problem is that most teaching in DSP seems to be about teaching how >> to use Matlab to design or solve a problem. So, without Matlab, a >> student does not how to design or solve a problem, because they did not >> learn the theory nor the mathematics itself well. >> >> So, for a student of a typical signals and systems course, Matlab IS the >> subject itself. They can plot system responses, design a filter, do all >> sorts of things using Matlab commands only. Take Matlab or simulink >> away, and they are lost. >> >> My point is, Matlab is not just a programming language for many. Matlab >> commands and tools seem to have morphed into the DSP subject itself, so >> can't separate the two. > > Are you sure that this is the intent, or that this is how the students > that post on USENET view it? > > Certainly when I was learning signals and systems decades ago the 'C' > students (and even a few of the 'A' students) would totally fail to > grasp the underlying theory, while still being able to make up for this > lack by energetically applying the appropriate computations by rote to > get the required answers to homework problems. > > Move forward twenty five years, and you find that doing a Fourier > transform by hand has been replaced by tippy-tappy-typing Matlab > commands -- but does that mean that it is the instructor's intent to > present "Matlab is DSP", or just that there are still the same > proportion of students that make it through by rote with no > understanding, but that the rote is different than when you were an > undergrad? >Or, to tie it together, that the 'C' students you used to know, who entirely failed to grasp the underlying concepts, are now professors teaching that Matlab == DSP. -- Rob Gaddi, Highland Technology Email address is currently out of order
Reply by ●July 6, 20102010-07-06
Rob Gaddi wrote:> On 7/4/2010 5:09 PM, Tim Wescott wrote: >> On 07/04/2010 04:40 PM, Nasser M. Abbasi wrote: >>> On 7/4/2010 12:49 PM, Richard Owlett wrote: >>> >>>> *ALL* responses to be independent of programming language!!! >>>> You do understand that FORTRAN, BASIC, matlab etc *are* ALL >>>> programming languages. ;/ *LOL* >>> >>> >>> The problem is that most teaching in DSP seems to be about teaching how >>> to use Matlab to design or solve a problem. So, without Matlab, a >>> student does not how to design or solve a problem, because they did not >>> learn the theory nor the mathematics itself well. >>> >>> So, for a student of a typical signals and systems course, Matlab IS the >>> subject itself. They can plot system responses, design a filter, do all >>> sorts of things using Matlab commands only. Take Matlab or simulink >>> away, and they are lost. >>> >>> My point is, Matlab is not just a programming language for many. Matlab >>> commands and tools seem to have morphed into the DSP subject itself, so >>> can't separate the two. >> >> >> Are you sure that this is the intent, or that this is how the students >> that post on USENET view it? >> >> Certainly when I was learning signals and systems decades ago the 'C' >> students (and even a few of the 'A' students) would totally fail to >> grasp the underlying theory, while still being able to make up for this >> lack by energetically applying the appropriate computations by rote to >> get the required answers to homework problems. >> >> Move forward twenty five years, and you find that doing a Fourier >> transform by hand has been replaced by tippy-tappy-typing Matlab >> commands -- but does that mean that it is the instructor's intent to >> present "Matlab is DSP", or just that there are still the same >> proportion of students that make it through by rote with no >> understanding, but that the rote is different than when you were an >> undergrad? >> > > Or, to tie it together, that the 'C' students you used to know, who > entirely failed to grasp the underlying concepts, are now professors > teaching that Matlab == DSP.I think the problem results from objectivism and political correctness. A professor can only ask questions at the test only if he provided canned answers for those questions in his course. Hence the art of problem solving is replaced by the art of picking correct answer from the list of multiple choices. Matlab is the big list of such choices, hence there are so many stupidents matlabi around. VLV






