contributions.m 893 B

12345678910111213141516171819202122232425262728
  1. function [xc]=contributions(A,s)
  2. % Computation of the true contributions - V1.2
  3. %
  4. % Inputs
  5. % A : mixing tensor whose A(i,j,:) element is the filter associated to the
  6. % j^th source and to the i^th observation
  7. % s : source vector
  8. %
  9. % Output
  10. % xc : tensor whose xc(i,j,:) element is the true contribution of the j^th
  11. % source in the i^th observation
  12. % -------------------------------------------------------------------------
  13. % History of the software:
  14. % V1.1: original software written by J. Thomas
  15. %
  16. % V1.2: Error messages appeared with recent releases of Matlab in the function
  17. % contributions. This version corrects them.
  18. % Author: Matthieu PUIGT Contact: matthieu.puigt@univ-littoral.fr
  19. %
  20. % -------------------------------------------------------------------------
  21. for i=1:size(A,1)
  22. for j=1:size(A,2)
  23. xc(i,j,:)=filter(reshape(A(i,j,:),size(A,3),1,1),1,s(j,:));
  24. end
  25. end