Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
%%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 Commenti

Accedi per commentare.

Risposta accettata

KSSV
KSSV il 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 Commenti
KSSV
KSSV il 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 il 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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by