View Raw SPL
mag2db(s) { local db; db = 20*log10(mag(s)); db[s < 0] = nan; return(db); }