help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting the frequency response of a filter in "real" Hz


From: Sergei Steshenko
Subject: Re: Plotting the frequency response of a filter in "real" Hz
Date: Mon, 25 Apr 2016 06:58:09 +0000 (UTC)

--------------------------------------------
On Mon, 4/25/16, Guilherme Ritter <address@hidden> wrote:

 Subject: Re: Plotting the frequency response of a filter in "real" Hz
 To: "Ericbarnhill" <address@hidden>
 Cc: address@hidden
 Date: Monday, April 25, 2016, 3:59 AM
 
 
 2016-04-24 15:52 GMT-03:00
 Ericbarnhill <address@hidden>:
  Hi Guilherme,
 
 freqz()
 uses normalised frequencies. If you want specific
 frequencies, you just have to de-normalize them.
 
 How much
 help you need, probably depends on how much you have learned
 about frequency response and transfer functions. Do you
 understand what freqz() does enough so that you can
 "fork" it for yourself, and replace the normalised
 frequencies with specific Hz values? 
 
 If not I
 can provide a bit of code. Probably the best thing for your
 DSP chops, though, is to first code up your own frequency
 response function based on what you understand freqz() to be
 doing. 
 
 Eric
  Message:
 6
  Date: Wed, 20 Apr 2016
 21:44:42 -0300
  From: Guilherme
 Ritter <address@hidden>
  To: address@hidden
  Subject: Plotting the frequency
 response of a filter in "real" Hz
  Message-ID:
  <address@hidden>
  Content-Type: text/plain;
 charset="utf-8"
  
  Hi everyone.
  
 
 I've just started in filter design at college and
 I'm learning to use
  Octave
 for it. I want to see the frequency response of filters I
 design.
  I've managed to find
 code on the internet, but the output's x axis is in
  radian frequency. I'd like it
 to show "actual" Hz. For example, if the
  cutoff frequency is 5,5 kHz,
 I'd like for it to be represented in the
  plot's x axis at 5500 or
 5,5.
  
  I've searched a lot but
 couldn't find anything, only some solutions that
  work in MatLab but not in Octave.
 At college, I'm using Octave 4.0.0,
  packages control 3.0.0 and signal
 1.3.2, Windows 7 Enterprise x64. At home,
  all the versions are up to date,
 Xubuntu 14.04 x64.
  
  I've found the code here:
  https://ccrma.stanford.edu/~jos/fp/Example_LPF_Frequency_Response.html
  
  Can I
 use Octave's functions to get that plot the way I want
 it?
  
 
 Thanks in advance.
 
 
 
 _______________________________________________
 
 Help-octave mailing list
 
 address@hidden
 
 https://lists.gnu.org/mailman/listinfo/help-octave
 
 
 
 Yeah, I just read freqz's
 reference page again and I really don't know what it
 does. I did managed to do what I want by using MatLab and
 freqzplot, it's just that I don't have MatLab in
 college in the DSP lab, only Octave.
 Thanks for all the help so
 far, anyway.
 -----Inline Attachment Follows-----
 
 _______________________________________________

"
I just read freqz's
 reference page again and I really don't know what it
 does. I did managed to do what I want by using MatLab and
 freqzplot, it's just that I don't have MatLab in
 college in the DSP lab, only Octave.
"

- the real issue you are deal is that you have a plotting utility plotting

x, f(x)

and all you need to do is plot

k * x, f(x)
.

The 'plot' family of functions (e.g. 'semilogx') gives you the opportunity to 
specify pairs of 'x', 'y' pairs and you can scale both whatever way you like. 
And not  only scale, but plot

f1(x), f2(y)

for whatever f1, f2.

I.e. you have to read output of

help plot
help semilogx
.

--Sergei.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]