Assume we have a 3 dimensional array F
and 2 dimensional matrix S
.
First I find a matrix Y
which is F
multiplied by S
. Then I try to find an estimate of F
(lets call it F_est
) from Y
as sanity check in my code.
Can anyone see a flaw in logic, I dont seem to know why F_est
is not exactly F
.
F= randn(2,4,600);
S= randn(4,600);
for i =1:size(F,1);
for j=1:size(F,2)
for k= 1:size(F,3)
Y(i,k)= F(i,j,k) * S(j,k);
end
end
end
for i =1:size(F,1)
for j=1:size(F,2)
for k= 1:size(F,3)
F_est(i,j,k)= Y(i,k) / S(j,k);
end
end
end
then I try to see if F_est - F
is zero and it is not. Any ideas. Much aprreciated.
**** EDIT after comments
Based on the answers I got I am wondering if the code below makes any sense?
for k=1:size(F,3)
Y(:,k) = squeeze(F(:,:,k)* S(:,k)
end
Am I able to recover F if I have Y and S?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…