I am trying to compute value of probabilitiy distribution The formula is ok, code is working I have no error but some values are coming as 0. However I should have a value except zero
Here is my code:
function P = Prob(A_ax,B_by,rho)
P = zeros(d,d,bcount,m);
P(a,b,x,y) = real( trace(kron(A_ax(:,:,x,a),B_by(:,:,y,b))*rho));
As you can see the other values are 0. Where am I doing wrong?