필터 지우기
필터 지우기

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 (최근 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

댓글을 달려면 로그인하십시오.

채택된 답변

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 CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by