Mercurial > hg > ddm
view ddm_fft_2.m @ 0:a4a7e3405062
Import DDM code by Sašo Muševič
author | Dan Stowell <dan.stowell@elec.qmul.ac.uk> |
---|---|
date | Thu, 09 May 2013 20:04:15 +0100 |
parents | |
children |
line wrap: on
line source
function [df2,A_sys,b_sys] = ddm_fft_2(win, win_der, mf_ders, sig, N, N_fft, fs) R = 2; Q = R; % nr of unknows is the same as the number of model funcs, fact! [A_sys b_sys] = ddm_lin_sys_fft(Q,R,win, win_der, mf_ders, sig, N, N_fft, fs); % A_sys1 = cat(2,shiftdim(A(1:N_fft-1,1),-2),shiftdim(A(1:N_fft-1,2),-2)); % A_sys2 = cat(2,shiftdim(A(2:N_fft ,1),-2),shiftdim(A(2:N_fft ,2),-2)); % A_sys = cat(1,A_sys1,A_sys2); % b_sys = cat(1,shiftdim(b(1:N_fft-1).',-1),shiftdim(b(2:N_fft).', -1)); % A_sys = A_sys_; % b_sys = b_sys_; df2 = lin_solve_dgr_2(A_sys,b_sys,N_fft-1); %hardcoded degree 2 solver (fast) end