hi guys, I'm calculating False rate and miss rate but when I use wi =1:160 for false rate and wi=160+1 according to the code below my wi matrix is empty [] consequently I dont get results expected may someone tell me where I'm writing wrong

1 vue (au cours des 30 derniers jours)
%%false alarm rate
falseTa=0;
falseQa=0;
for wi=1:160
if T1(wi)>Ta
falseTa=falseTa+1;
end
falserate_kpca_Ta=100*falseTa/160;
if Q1(wi)>Qa
falseQa=falseQa+1;
end
falserate_kpca_Qa=100*falseQa/160;
end
missTa=0;
missQa=0;
for wi=160+1:size(T1,2)
if T1(wi)<Ta
missTa=missTa+1;
end
if Q1(wi)<Qa
missQa=missQa+1;
end
end
missrate_kpca_Ta=100*missTa/(size(T1,2)-160);
missrate_kpca_Qa=100*missQa/(size(T1,2)-160);
  5 commentaires

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 6 Nov 2018
wi=160+1:size(T1,2)
The above is not correct...
The above gives result obviously empty. Because you cannot generate any numbers between 161:1...I guess you should use:
wi=160+1:-1:size(T1,2)
  5 commentaires
KSSV
KSSV le 6 Nov 2018
What you want it to be? It is easy to understand...
size of T1 is 961*1
wi=160+1:size(T1,1) => wi = 161:961
The above gives wi as 1*801.
Rui Mauaie
Rui Mauaie le 6 Nov 2018
You are right but according to what you wrote the final result should be 161:961 (that range), but I have 961 not that range!! I think should go deep to understand. thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by