Elements of Array Should not be the Same
Ältere Kommentare anzeigen
Hello,
I have this value for element of my list:

And I have this code:
function [A,B] = CHSHmeasurement(d)
A=zeros(d,d,2,d);
B=A;
projectors_of_sigma_x = [1/sqrt(2)*[1;1],1/sqrt(2)*[1;-1]];
for k = 1:d
for l =1:length(projectors_of_sigma_x)
%A(k,k,1,k)=projectors_of_sigma_x(l);
A(:,:,1,k)=projectors_of_sigma_x(l);
end
end
end
However I have the same element for A although I have the different elements in the projectors_of_sigma_x


2 Kommentare
madhan ravi
am 25 Jun. 2020
Please provide the full error message. And d?
Gözde Üstün
am 25 Jun. 2020
Bearbeitet: Gözde Üstün
am 25 Jun. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!