Home > vbmeg > functions > device > active_check > vb_eval_bad_ch_number.m

vb_eval_bad_ch_number

PURPOSE ^

SYNOPSIS ^

function [p,Nbad] = vb_eval_bad_ch_number(y1,y2,th,plist)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    [p,Nbad] = vb_eval_bad_ch_number(y1,y2,th,plist)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 Nch = size(y1,1);
0007 Npr = length(plist);
0008 
0009 p  = zeros(Nch,1);
0010 Nbad = zeros(Npr,1);
0011 
0012 if isempty(y2)
0013     p = sum((y1 > th(1)),2)/size(y1,2);
0014 else
0015     p = sum((y1 > th(1) | y2 > th(2) ),2)/size(y1,2);
0016 end    
0017 
0018 % number of bad channel for p-threshold
0019 h  = hist(p,plist);
0020 Nbad = Nch - cumsum(h(:));
0021 %end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005