view win_mod_poly.m @ 2:e2b116f3b69b

fixed reallocate and pinv_2_fast to work on Octave added short example very quickly, might not be working properly
author smusevic
date Thu, 25 Jul 2013 13:07:07 +0100
parents a4a7e3405062
children
line wrap: on
line source
function wmp = win_mod_poly(N, t, poly, w)
R = size(poly,1);
ply_val = zeros(N,R);
w_mat = repmat (w, 1, R);
for k = 1:R
  ply_val(:,k) = polyval(poly(k,:),t).';
end
wmp = sum (w_mat.*exp(ply_val),1);
end