-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest_time.m
30 lines (30 loc) · 921 Bytes
/
test_time.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
% intel(R) core(TM) i7- 2620M CPU @ 2.70GHz
clear;clc;
load('data_trials');
[n ntrials nvar]=size(data);
order=1;
ndmax=8;
nd=4;
file=['data_trials_' num2str(ndmax) '_' num2str(nd)];
init=false;
times=[10 50 100 150 200];
nt=length(times);
for i=1:nt
T=times(i);
datatot=zeros(n,T,nvar);
datatot=data(:,1:T,:);
tic
[ytotc{i} indc{i}]=init_partial_conditioning_par(datatot,ndmax,order);
time_c(i)=toc;
tic
pcgc_c{i}=partial_CGC_fix_nd(datatot,order,nd,indc{i});
timefix_c(i)=toc;
tic
[ytotm{i} indm{i}]=init_partial_conditioning_par_m(datatot,ndmax,order);
time_m(i)=toc;
tic
pcgc_m{i}=partial_CGC_fix_nd_m(datatot,order,nd,indm{i});
timefix_m(i)=toc;
disp([time_c(i) time_m(i) timefix_c(i) timefix_m(i)]);
end
save(file,'nvar','times','ytotc','indc','ytotm','indm','time_m','time_c','pcgc_c','pcgc_m','timefix_m','timefix_c');