hii, can anyone please tell me the problem in the code ?why find doesn't give me the index of the number in theta array thanks
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
fatema hamodi
am 24 Mai 2017
Kommentiert: fatema hamodi
am 24 Mai 2017
M=3;%sites number
N=2;%particles number
U=-1;
num_of_states= nchoosek(M+N-1,N);
fock_mat=generate_fock_states(initial_vector,M,num_of_states);
theta=centerofmass(N,M,num_of_states,fock_mat)
find(theta(:,1)==-2.0944)
any(theta(:,1)==-2.0944)
- | the result I got after running|*
theta =
0
1.0472
2.0944
-1.0472
3.1416
-2.0944
ans = Empty matrix: 0-by-1
ans = 0
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!