From: student28 on
(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]


From: Jerry Avins on
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.
�����������������������������������������������������������������������
From: student28 on
>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?
From: Richard Owlett on
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*




From: Nasser M. Abbasi on
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