Guest User

Untitled

a guest
May 17th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.28 KB | None | 0 0
  1. clear all;
  2.  
  3. ni = 2;
  4. no = 3;
  5. nr = 2;
  6. np = 2;
  7.  
  8. x = ones(np, ni);
  9.  
  10. w = reshape(1:nr*np, nr, 1, np)
  11. c = bsxfun(@times, permute(1:nr, [1 3 2]), ones(no, ni))
  12.  
  13. f = zeros(no, ni, np);
  14. for ii=1:np
  15.  for jj=1:nr
  16.    f(:,:,ii) = f(:,:,ii) + w(jj, 1, ii)*c(:,:,jj);
  17.   end
  18. end
  19. f
Add Comment
Please, Sign In to add comment