spm_Volt_W.m 501 B

12345678910111213141516171819
  1. function [W] = spm_Volt_W(u)
  2. % returns basis functions used for Volterra expansion
  3. % FORMAT [W] = spm_Volt_W(u);
  4. % u - times {seconds}
  5. % W - basis functions (mixture of Gammas)
  6. %_______________________________________________________________________
  7. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  8. % Karl Friston
  9. % $Id: spm_Volt_W.m 1143 2008-02-07 19:33:33Z spm $
  10. u = u(:);
  11. W = [];
  12. for i = 2:4
  13. m = (2^i);
  14. s = sqrt(m);
  15. W = [W spm_Gpdf(u,(m/s)^2,m/s^2)];
  16. end