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: Guilherme Ritter
Subject: Re: Plotting the frequency response of a filter in "real" Hz
Date: Thu, 21 Apr 2016 14:48:00 -0300

I don't quite understand how Octave works regarding function parameters, and I also couldn't find anything online about that, but I suppose I have to write "Fs = some_value" as a parameter to specify the sampling rate to freqz. Simply passing a third parameter gets it interpreted as "n", right? I tried both ways anyway and the plot and the axes remained the same.

2016-04-21 13:09 GMT-03:00 Mike Miller <address@hidden>:
On Wed, Apr 20, 2016 at 21:44:42 -0300, Guilherme Ritter wrote:
> 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?

Have you looked at the help for freqz? It takes an optional sampling
frequency argument that should plot what you want.

https://www.gnu.org/software/octave/doc/interpreter/Signal-Processing.html#XREFfreqz

--
mike


reply via email to

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