Skip to content

Commit

Permalink
Create outp.m
Browse files Browse the repository at this point in the history
  • Loading branch information
SayBender committed Jun 1, 2020
1 parent d4a88e5 commit 6dadce2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions outp.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function [T]=outp(M1,M2,M3,l)
% regular outerproduct
% P = cp_als(M,2);


% load kten_test2
% load spten_test3
lambda=l;

a=M1;
b=M2;
c=M3;
R=size(M1,2);


for k=1:size(M1,1)
for j=1:size(M2,1)
for i=1:size(M3,1)
SS=0;
S=0;
for r=1:R
SS=lambda(r)*a(k,r)*b(j,r)*c(i,r);
S=SS+S;
end
T(k,j,i)=S;
end
end
end
end

0 comments on commit 6dadce2

Please sign in to comment.