Re: [Faudiostream-devel] plotting frequency response

2013-09-14 Thread urban
Hi Julius, there is an undefined function called "db" (marked below). I guessed it could be implemented like: %function db(a,b) % min(20*log10(a),b) ; %endfunction but I dont know octave. Can you provide the function definition? Urban > I always use the "pfo.m" script below ("plot faustout"

Re: [Faudiostream-devel] plotting frequency response

2013-09-14 Thread Julius Smith
Hi Urban, You surmise correctly. Here is my implementation: function [xdb] = db(x,mindb) % [y] = db(x,mindb) % convert x to db, optionally clipped to mindb ax = abs(x); xmax = max(ax(:)); if nargin<2, xmin = xmax*eps; else xmin = 10^(mindb/20); end xdb = 20*log10(max(abs(x),xmin*ones(size(x