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 回表示 (過去 30 日間)
%%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 件のコメント
Rui Mauaie
Rui Mauaie 2018 年 11 月 6 日
the value of Q1 I already calculated it

サインインしてコメントする。

採用された回答

KSSV
KSSV 2018 年 11 月 6 日
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 件のコメント
KSSV
KSSV 2018 年 11 月 6 日
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 2018 年 11 月 6 日
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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by