-
Notifications
You must be signed in to change notification settings - Fork 2
/
handleQuantMeanTraceExtract.m
33 lines (23 loc) · 1014 Bytes
/
handleQuantMeanTraceExtract.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function [ numberOfTimes ] = handleQuantMeanTraceExtract( quant_mean_trace_extract )
%HANDLEQUANTMEANTRACEEXTRACT Summary of this function goes here
% Detailed explanation goes here
block_num = size( quant_mean_trace_extract );
% ת»»Îª1ÐÐnÁоØÕó
quant_mean_trace_extract = reshape(quant_mean_trace_extract', 1, numel( quant_mean_trace_extract ));
numberOfTimes = zeros(1, numel( quant_mean_trace_extract ) );
for k = 1 : 5: numel(quant_mean_trace_extract)
end_index = k + 4;
if(end_index > numel(quant_mean_trace_extract))
end_index = numel(quant_mean_trace_extract);
end
corresponding_traces = quant_mean_trace_extract(k : end_index);
count = zeros(1, end_index + 1 - k);
for m = 1 : end_index + 1 - k
number = corresponding_traces(m);
count(1, m) = numel( find(corresponding_traces == number) );
end
numberOfTimes(1, k: end_index) = count;
end
numberOfTimes = reshape(numberOfTimes, block_num);
numberOfTimes = numberOfTimes';
end