0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % test utils.math.linifitsvd
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % 05-06-2009 L Ferraioli
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % CREATION
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % $Id: mdc3_exp3_loop_v3.m,v 1.2 2009/09/24 09:48:12 luigi Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 %% Loading data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % load cell arrays with parameters names and values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 fprintf('===== loading data... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % laod parnames and values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\parnames_10perc.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\exp3_2_10perc_nomvalues.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\exp3_2_10perc_truevalues.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 % load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\usedparams_10perc.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 % set ordered used parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 % usedparams = {'dH','dsH','dS11','dS1D','dSD1','dSDD','dh1','dsh1',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 % 'dh2','dsh2','dx1','dx2'};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 usedparams = {'dH','dsH','dS11','dS1D','dSD1','dSDD',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 'dh2','dsh2','dx1','dx2'};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 %% load Coloring filters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 fprintf('===== loading coloring filters... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 cf11 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_CF11.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 cf11.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 cf12 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_CF12.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 cf12.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 cf21 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_CF21.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 cf21.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 cf22 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_CF22.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 cf22.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 %% load Whitening filters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 fprintf('===== loading whitening filters... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 wf11 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_WF11.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 wf11.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 wf12 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_WF12.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 wf12.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 wf21 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_WF21.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 wf21.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 wf22 = miir('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Filters\exp1_WF22.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 wf22.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 %% get non-linear response model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 % the model is non-linear in the parameter dependence
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 fprintf('===== Get TF Model... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 % H is a 2x2 matrix of smodels representing the transfer function from
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 % controllers guidance to ifo output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 H = matrix(plist('built-in','mdc3_ifo2ifo_v2'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 %% Get derivative models
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 % those are derivatives of the model with respect to the parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 fprintf('===== Get derivative models... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 % differentiate respect to the stiffness
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 T_dH = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 T_dsH = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 T_dS11 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 T_dS1D = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 T_dSD1 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 T_dSDD = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 T_dh1 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 T_dsh1 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 T_dh2 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 T_dsh2 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 T_dx1 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 T_dx2 = copy(H,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 % differentiate respect to the stiffness
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 for ii = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 T_dH.objs(ii) = diff(H.objs(ii),'dH');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 T_dsH.objs(ii) = diff(H.objs(ii),'dsH');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 T_dS11.objs(ii) = diff(H.objs(ii),'dS11');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 T_dS1D.objs(ii) = diff(H.objs(ii),'dS1D');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 T_dSD1.objs(ii) = diff(H.objs(ii),'dSD1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 T_dSDD.objs(ii) = diff(H.objs(ii),'dSDD');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 T_dh1.objs(ii) = diff(H.objs(ii),'dh1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 T_dsh1.objs(ii) = diff(H.objs(ii),'dsh1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 T_dh2.objs(ii) = diff(H.objs(ii),'dh2');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 T_dsh2.objs(ii) = diff(H.objs(ii),'dsh2');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 T_dx1.objs(ii) = diff(H.objs(ii),'dx1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 T_dx2.objs(ii) = diff(H.objs(ii),'dx2');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 %% *** Signals generation ***
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 % ************************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 % The output of each experiment is generated according to the following
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 % scheme
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 % i) generation of the output of the system to a given input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 % ii) generation of the output noise time series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 % iii) output signals and noise are added to get the final output signals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 % for each experiment
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 % ************************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 %% load input signal
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 % load input data series in accordance to TN 3045
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 fprintf('===== Loading input signals... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 oi1 = ao('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\signals_noise\exp1_1_oi1.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 oi1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 oi1.setYunits('m');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 oid = ao('C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\signals_noise\exp1_2_oid.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 oid.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 oid.setYunits('m');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 %% get signals - true values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 fprintf('===== get true values... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 % calculate the response of the system for the first two experiments of TN
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 % 3045
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 % Exp 3.1 input on first channel, no input on the differential channel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 % Exp 3.2 no input on the first channel, input on the differential channel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 % Output is always taken from both channels
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 % get response with true params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 for ii = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 H.objs(ii).setParams(parnames,exp3_truevalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 s11 = fftfilt(oi1,H.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 s12 = fftfilt(oid,H.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 s21 = fftfilt(oi1,H.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 s22 = fftfilt(oid,H.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 % get output signals for exp 3.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 s1_exp_3_1 = s11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 s1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 sd_exp_3_1 = s21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 sd_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 % get output signals for exp 3.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 s1_exp_3_2 = s12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 s1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 sd_exp_3_2 = s22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 sd_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 %% Adding noise to signals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 fprintf('===== adding noise to signals... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 % get params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 Nsecs = s1_exp_3_1.nsecs;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 fs = s1_exp_3_1.fs;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 plcf = plist('bank','parallel');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 % starting noise generation exp1.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 a1_exp_3_1 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', Nsecs));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 a2_exp_3_1 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', Nsecs));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 % coloring noise exp 1.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 na1_exp_3_1 = filter(a1_exp_3_1,cf11,plcf) + filter(a2_exp_3_1,cf12,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 na2_exp_3_1 = filter(a1_exp_3_1,cf21,plcf) + filter(a2_exp_3_1,cf22,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 % starting noise generation exp 1.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 a1_exp_3_2 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', Nsecs));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 a2_exp_3_2 = ao(plist('tsfcn', 'randn(size(t))', 'fs', fs, 'nsecs', Nsecs));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 % coloring noise exp 1.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 na1_exp_3_2 = filter(a1_exp_3_2,cf11,plcf) + filter(a2_exp_3_2,cf12,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 na2_exp_3_2 = filter(a1_exp_3_2,cf21,plcf) + filter(a2_exp_3_2,cf22,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 % adding noise to signals, These signals are the output of our experiments
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 o1_exp_3_1 = s1_exp_3_1 + na1_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 od_exp_3_1 = sd_exp_3_1 + na2_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 o1_exp_3_2 = s1_exp_3_2 + na1_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 od_exp_3_2 = sd_exp_3_2 + na2_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 % %% plot
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 % iplot(o1_exp_3_1,plist('Legends', {'i1->o1'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 % iplot(od_exp_3_1,plist('Legends', {'i1->od'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 % iplot(o1_exp_3_2,plist('Legends', {'id->o1'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 % iplot(od_exp_3_2,plist('Legends', {'id->od'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 %% Run loop to get parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 % ************************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 % The linear fit scheme is the following
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 % y - y0 = sum( p(dH/dp) )
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 % y is the output data series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 % y0 is the calculated nominal response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 % dH/dp are derivatives of model with respect to parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 % p are the parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 % If a whitening step is required it can be applied as:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 % WF( y - y0 ) = WF( sum( p(dH/dp) ) )
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 % = sum( p WF( dH/dp ) )
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 % ************************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 % Fit loop for parameters extraction
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 % 1) Response of the derivatives of the model with respect to the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 % parameters is calculated according to the parameters nominal values.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 % These represent what I call, fit basis.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 % 2) Fit basis is whitened in order to consider the effect of the whitening
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 % filter on data.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 % 3) Fit matrices are then built up from fit basis.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 % 4) Ground experiments results are input as additional information on some
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 % parameters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 % 5) Nominal system response is calculated.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 % 6) Nominal response is subtracted from output signals for the different
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 % experiments.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 % 7) Whitening filter is applied to the difference y - y0.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 % 8) Linear fit is performed, information from different experiments and
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 % ground experiments is joined to increase fit accuracy.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 % 9) The values of the parameters obtained are used to calculate a new set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 % of nominal values which are used in the following loop.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 % ************************************************************************
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 % run a loop to estimate system parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 fprintf('===== start loop iteration... =====\n')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 N = 1; % Number of iterations
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 % f = logspace(-5,log10(fs/2),300).';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 plcf = plist('bank','parallel');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 % init storage struct
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 mdc3_exp3_loop_results = struct('a',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 'Ca',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 'Corra',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 'Vu',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 'bu',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 'Cbu',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 'mse',cell(1,N),...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 'params',cell(1,N));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 % for ii = 1:N
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 fprintf('===== iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 % get template
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 fprintf('===== Get template - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 % set nominal values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 for jj = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 T_dH.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 T_dsH.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 T_dS11.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 T_dS1D.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 T_dSD1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 T_dSDD.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 T_dh1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 T_dsh1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 T_dh2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 T_dsh2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 T_dx1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 T_dx2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 % get response for dH
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 ds11 = fftfilt(oi1,T_dH.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 ds12 = fftfilt(oid,T_dH.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 ds21 = fftfilt(oi1,T_dH.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 ds22 = fftfilt(oid,T_dH.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 dH_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 dH_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 dH_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 dH_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 dH_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 dH_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 dH_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 dH_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 % get response for dsH
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 ds11 = fftfilt(oi1,T_dsH.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 ds12 = fftfilt(oid,T_dsH.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 ds21 = fftfilt(oi1,T_dsH.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 ds22 = fftfilt(oid,T_dsH.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 dsH_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 dsH_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 dsH_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 dsH_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 dsH_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 dsH_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 dsH_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 dsH_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 % get response for dS11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 ds11 = fftfilt(oi1,T_dS11.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 ds12 = fftfilt(oid,T_dS11.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 ds21 = fftfilt(oi1,T_dS11.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 ds22 = fftfilt(oid,T_dS11.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 dS11_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 dS11_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 dS11_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 dS11_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 dS11_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 dS11_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 dS11_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 dS11_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 % get response for dS1D
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 ds11 = fftfilt(oi1,T_dS1D.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 ds12 = fftfilt(oid,T_dS1D.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 ds21 = fftfilt(oi1,T_dS1D.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 ds22 = fftfilt(oid,T_dS1D.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 dS1D_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 dS1D_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 dS1D_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 dS1D_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 dS1D_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 dS1D_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 dS1D_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 dS1D_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 % get response for SD1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 ds11 = fftfilt(oi1,T_dSD1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 ds12 = fftfilt(oid,T_dSD1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 ds21 = fftfilt(oi1,T_dSD1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 ds22 = fftfilt(oid,T_dSD1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 dSD1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 dSD1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 dSD1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 dSD1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 dSD1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 dSD1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 dSD1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 dSD1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 % get response for SDD
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 ds11 = fftfilt(oi1,T_dSDD.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 ds12 = fftfilt(oid,T_dSDD.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 ds21 = fftfilt(oi1,T_dSDD.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 ds22 = fftfilt(oid,T_dSDD.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 dSDD_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 dSDD_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 dSDD_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 dSDD_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 dSDD_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 dSDD_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 dSDD_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 dSDD_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 % get response for dh1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 ds11 = fftfilt(oi1,T_dh1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 ds12 = fftfilt(oid,T_dh1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 ds21 = fftfilt(oi1,T_dh1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 ds22 = fftfilt(oid,T_dh1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 dh1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 dh1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 dh1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 dh1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 dh1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 dh1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 dh1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 dh1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 % get response for dsh1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 ds11 = fftfilt(oi1,T_dsh1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 ds12 = fftfilt(oid,T_dsh1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 ds21 = fftfilt(oi1,T_dsh1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 ds22 = fftfilt(oid,T_dsh1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 dsh1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 dsh1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 dsh1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 dsh1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 dsh1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 dsh1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 dsh1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 dsh1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 % get response for dh2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 ds11 = fftfilt(oi1,T_dh2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 ds12 = fftfilt(oid,T_dh2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 ds21 = fftfilt(oi1,T_dh2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 ds22 = fftfilt(oid,T_dh2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 dh2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 dh2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 dh2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 dh2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 dh2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 dh2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 dh2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 dh2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 % get response for dsh2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 ds11 = fftfilt(oi1,T_dsh2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 ds12 = fftfilt(oid,T_dsh2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 ds21 = fftfilt(oi1,T_dsh2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 ds22 = fftfilt(oid,T_dsh2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 dsh2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434 dsh2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 dsh2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 dsh2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437 dsh2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 dsh2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 dsh2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440 dsh2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 % get response for dx1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 ds11 = fftfilt(oi1,T_dx1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 ds12 = fftfilt(oid,T_dx1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 ds21 = fftfilt(oi1,T_dx1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 ds22 = fftfilt(oid,T_dx1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 dx1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 dx1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 dx1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451 dx1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 dx1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 dx1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 dx1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 dx1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458 % get response for dx2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 ds11 = fftfilt(oi1,T_dx2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 ds12 = fftfilt(oid,T_dx2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 ds21 = fftfilt(oi1,T_dx2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462 ds22 = fftfilt(oid,T_dx2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464 dx2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465 dx2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466 dx2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467 dx2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468 dx2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 dx2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470 dx2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 dx2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 % do whitening on template
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476 fprintf('===== do whitening on template - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 plwf = plist('bank','parallel');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480 dH_1w_exp_3_1 = filter(dH_1_exp_3_1,wf11,plwf) + filter(dH_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 dH_12w_exp_3_1 = filter(dH_1_exp_3_1,wf21,plwf) + filter(dH_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 dsH_1w_exp_3_1 = filter(dsH_1_exp_3_1,wf11,plwf) + filter(dsH_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484 dsH_12w_exp_3_1 = filter(dsH_1_exp_3_1,wf21,plwf) + filter(dsH_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486 dS11_1w_exp_3_1 = filter(dS11_1_exp_3_1,wf11,plwf) + filter(dS11_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 dS11_12w_exp_3_1 = filter(dS11_1_exp_3_1,wf21,plwf) + filter(dS11_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 dS1D_1w_exp_3_1 = filter(dS1D_1_exp_3_1,wf11,plwf) + filter(dS1D_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490 dS1D_12w_exp_3_1 = filter(dS1D_1_exp_3_1,wf21,plwf) + filter(dS1D_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 dSD1_1w_exp_3_1 = filter(dSD1_1_exp_3_1,wf11,plwf) + filter(dSD1_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493 dSD1_12w_exp_3_1 = filter(dSD1_1_exp_3_1,wf21,plwf) + filter(dSD1_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495 dSDD_1w_exp_3_1 = filter(dSDD_1_exp_3_1,wf11,plwf) + filter(dSDD_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496 dSDD_12w_exp_3_1 = filter(dSDD_1_exp_3_1,wf21,plwf) + filter(dSDD_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498 dh1_1w_exp_3_1 = filter(dh1_1_exp_3_1,wf11,plwf) + filter(dh1_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 dh1_12w_exp_3_1 = filter(dh1_1_exp_3_1,wf21,plwf) + filter(dh1_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 dsh1_1w_exp_3_1 = filter(dsh1_1_exp_3_1,wf11,plwf) + filter(dsh1_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502 dsh1_12w_exp_3_1 = filter(dsh1_1_exp_3_1,wf21,plwf) + filter(dsh1_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 dh2_1w_exp_3_1 = filter(dh2_1_exp_3_1,wf11,plwf) + filter(dh2_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505 dh2_12w_exp_3_1 = filter(dh2_1_exp_3_1,wf21,plwf) + filter(dh2_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 dsh2_1w_exp_3_1 = filter(dsh2_1_exp_3_1,wf11,plwf) + filter(dsh2_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 dsh2_12w_exp_3_1 = filter(dsh2_1_exp_3_1,wf21,plwf) + filter(dsh2_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 dx1_1w_exp_3_1 = filter(dx1_1_exp_3_1,wf11,plwf) + filter(dx1_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511 dx1_12w_exp_3_1 = filter(dx1_1_exp_3_1,wf21,plwf) + filter(dx1_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513 dx2_1w_exp_3_1 = filter(dx2_1_exp_3_1,wf11,plwf) + filter(dx2_12_exp_3_1,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 dx2_12w_exp_3_1 = filter(dx2_1_exp_3_1,wf21,plwf) + filter(dx2_12_exp_3_1,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518 dH_1w_exp_3_2 = filter(dH_1_exp_3_2,wf11,plwf) + filter(dH_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519 dH_12w_exp_3_2 = filter(dH_1_exp_3_2,wf21,plwf) + filter(dH_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521 dsH_1w_exp_3_2 = filter(dsH_1_exp_3_2,wf11,plwf) + filter(dsH_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 dsH_12w_exp_3_2 = filter(dsH_1_exp_3_2,wf21,plwf) + filter(dsH_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524 dS11_1w_exp_3_2 = filter(dS11_1_exp_3_2,wf11,plwf) + filter(dS11_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525 dS11_12w_exp_3_2 = filter(dS11_1_exp_3_2,wf21,plwf) + filter(dS11_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527 dS1D_1w_exp_3_2 = filter(dS1D_1_exp_3_2,wf11,plwf) + filter(dS1D_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528 dS1D_12w_exp_3_2 = filter(dS1D_1_exp_3_2,wf21,plwf) + filter(dS1D_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530 dSD1_1w_exp_3_2 = filter(dSD1_1_exp_3_2,wf11,plwf) + filter(dSD1_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531 dSD1_12w_exp_3_2 = filter(dSD1_1_exp_3_2,wf21,plwf) + filter(dSD1_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533 dSDD_1w_exp_3_2 = filter(dSDD_1_exp_3_2,wf11,plwf) + filter(dSDD_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 dSDD_12w_exp_3_2 = filter(dSDD_1_exp_3_2,wf21,plwf) + filter(dSDD_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 dh1_1w_exp_3_2 = filter(dh1_1_exp_3_2,wf11,plwf) + filter(dh1_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 dh1_12w_exp_3_2 = filter(dh1_1_exp_3_2,wf21,plwf) + filter(dh1_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 dsh1_1w_exp_3_2 = filter(dsh1_1_exp_3_2,wf11,plwf) + filter(dsh1_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 dsh1_12w_exp_3_2 = filter(dsh1_1_exp_3_2,wf21,plwf) + filter(dsh1_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 dh2_1w_exp_3_2 = filter(dh2_1_exp_3_2,wf11,plwf) + filter(dh2_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 dh2_12w_exp_3_2 = filter(dh2_1_exp_3_2,wf21,plwf) + filter(dh2_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 dsh2_1w_exp_3_2 = filter(dsh2_1_exp_3_2,wf11,plwf) + filter(dsh2_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546 dsh2_12w_exp_3_2 = filter(dsh2_1_exp_3_2,wf21,plwf) + filter(dsh2_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 dx1_1w_exp_3_2 = filter(dx1_1_exp_3_2,wf11,plwf) + filter(dx1_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 dx1_12w_exp_3_2 = filter(dx1_1_exp_3_2,wf21,plwf) + filter(dx1_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551 dx2_1w_exp_3_2 = filter(dx2_1_exp_3_2,wf11,plwf) + filter(dx2_12_exp_3_2,wf12,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552 dx2_12w_exp_3_2 = filter(dx2_1_exp_3_2,wf21,plwf) + filter(dx2_12_exp_3_2,wf22,plwf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 %%% Build fit matrices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556 fprintf('===== Build fit matrices - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558 % init data struct
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559 exps = struct();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 % exp 3.1 ch1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 dHw_exp_3_1 = [dH_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563 dsHw_exp_3_1 = [dsH_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 dS11w_exp_3_1 = [dS11_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 dS1Dw_exp_3_1 = [dS1D_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566 dSD1w_exp_3_1 = [dSD1_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567 dSDDw_exp_3_1 = [dSDD_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568 dh1w_exp_3_1 = [dh1_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 dsh1w_exp_3_1 = [dsh1_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 dh2w_exp_3_1 = [dh2_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571 dsh2w_exp_3_1 = [dsh2_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 dx1w_exp_3_1 = [dx1_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573 dx2w_exp_3_1 = [dx2_1w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575 K1_exp_3_1 = [dHw_exp_3_1 dsHw_exp_3_1 dS11w_exp_3_1 dS1Dw_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 dSD1w_exp_3_1 dSDDw_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577 dh2w_exp_3_1 dsh2w_exp_3_1 dx1w_exp_3_1 dx2w_exp_3_1];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 K1_exp_3_1(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582 % fill struct basis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583 exps(1).fitbasis = K1_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586 % exp 3.1 ch12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587 dHw_exp_3_1 = [dH_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588 dsHw_exp_3_1 = [dsH_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 dS11w_exp_3_1 = [dS11_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 dS1Dw_exp_3_1 = [dS1D_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591 dSD1w_exp_3_1 = [dSD1_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592 dSDDw_exp_3_1 = [dSDD_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593 dh1w_exp_3_1 = [dh1_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594 dsh1w_exp_3_1 = [dsh1_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 dh2w_exp_3_1 = [dh2_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596 dsh2w_exp_3_1 = [dsh2_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 dx1w_exp_3_1 = [dx1_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598 dx2w_exp_3_1 = [dx2_12w_exp_3_1.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 K12_exp_3_1 = [dHw_exp_3_1 dsHw_exp_3_1 dS11w_exp_3_1 dS1Dw_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 dSD1w_exp_3_1 dSDDw_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602 dh2w_exp_3_1 dsh2w_exp_3_1 dx1w_exp_3_1 dx2w_exp_3_1];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 clear dHw_exp_3_1 dsHw_exp_3_1 dS11w_exp_3_1 dS1Dw_exp_3_1 dSD1w_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605 dSDDw_exp_3_1 dh1w_exp_3_1 dsh1w_exp_3_1 dh2w_exp_3_1 dsh2w_exp_3_1...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 dx1w_exp_3_1 dx2w_exp_3_1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609 K12_exp_3_1(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610 % fill struct basis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611 exps(2).fitbasis = K12_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614 % exp 3.2 ch1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615 dHw_exp_3_2 = [dH_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616 dsHw_exp_3_2 = [dsH_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617 dS11w_exp_3_2 = [dS11_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618 dS1Dw_exp_3_2 = [dS1D_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
619 dSD1w_exp_3_2 = [dSD1_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
620 dSDDw_exp_3_2 = [dSDD_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
621 dh1w_exp_3_2 = [dh1_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
622 dsh1w_exp_3_2 = [dsh1_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
623 dh2w_exp_3_2 = [dh2_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
624 dsh2w_exp_3_2 = [dsh2_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
625 dx1w_exp_3_2 = [dx1_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
626 dx2w_exp_3_2 = [dx2_1w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
627
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
628 K1_exp_3_2 = [dHw_exp_3_2 dsHw_exp_3_2 dS11w_exp_3_2 dS1Dw_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
629 dSD1w_exp_3_2 dSDDw_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
630 dh2w_exp_3_2 dsh2w_exp_3_2 dx1w_exp_3_2 dx2w_exp_3_2];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
631
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
632
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
633 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
634 K1_exp_3_2(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
635 % fill struct basis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
636 exps(3).fitbasis = K1_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
637
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
638 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
639 % exp 3.2 ch12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
640 dHw_exp_3_2 = [dH_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
641 dsHw_exp_3_2 = [dsH_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
642 dS11w_exp_3_2 = [dS11_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
643 dS1Dw_exp_3_2 = [dS1D_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
644 dSD1w_exp_3_2 = [dSD1_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
645 dSDDw_exp_3_2 = [dSDD_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
646 dh1w_exp_3_2 = [dh1_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
647 dsh1w_exp_3_2 = [dsh1_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
648 dh2w_exp_3_2 = [dh2_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
649 dsh2w_exp_3_2 = [dsh2_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
650 dx1w_exp_3_2 = [dx1_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
651 dx2w_exp_3_2 = [dx2_12w_exp_3_2.y];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
652
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
653 K12_exp_3_2 = [dHw_exp_3_2 dsHw_exp_3_2 dS11w_exp_3_2 dS1Dw_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
654 dSD1w_exp_3_2 dSDDw_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
655 dh2w_exp_3_2 dsh2w_exp_3_2 dx1w_exp_3_2 dx2w_exp_3_2];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
656
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
657 clear dHw_exp_3_2 dsHw_exp_3_2 dS11w_exp_3_2 dS1Dw_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
658 dSD1w_exp_3_2 dSDDw_exp_3_2 dh1w_exp_3_2 dsh1w_exp_3_2...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
659 dh2w_exp_3_2 dsh2w_exp_3_2 dx1w_exp_3_2 dx2w_exp_3_2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
660
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
661 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
662 K12_exp_3_2(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
663 % fill struct basis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
664 exps(4).fitbasis = K12_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
665
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
666
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
667 %%% Input on groud measured parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
668 fprintf('===== Input on-groud measured parameters - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
669
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
670 % init struct
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
671 groundexps = struct;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
672
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
673 % value for S11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
674 groundexps(1).pos = 3;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
675 groundexps(1).value = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
676 groundexps(1).err = 1e-4;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
677
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
678 % value for S1D
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
679 groundexps(2).pos = 4;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
680 groundexps(2).value = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
681 groundexps(2).err = 1e-3;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
682
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
683 % value for SDD
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
684 groundexps(3).pos = 6;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
685 groundexps(3).value = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
686 groundexps(3).err = 1e-4;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
687
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
688
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
689 %%% Get signals with nominal params %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
690 fprintf('===== Get signals with nominal params - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
691
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
692 % get response with nominal params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
693 for kk = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
694 H.objs(kk).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
695 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
696
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
697 s11 = fftfilt(oi1,H.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
698 s12 = fftfilt(oid,H.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
699 s21 = fftfilt(oi1,H.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
700 s22 = fftfilt(oid,H.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
701
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
702 % get signals for exp 3.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
703 ns1_exp_3_1 = s11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
704 ns1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
705 nsd_exp_3_1 = s21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
706 nsd_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
707
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
708 % get signals for exp 3.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
709 ns1_exp_3_2 = s12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
710 ns1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
711 nsd_exp_3_2 = s22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
712 nsd_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
713
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
714 % subtract nominal response from true signals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
715 do1_exp_3_1 = o1_exp_3_1 - ns1_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
716 dod_exp_3_1 = od_exp_3_1 - nsd_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
717
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
718 do1_exp_3_2 = o1_exp_3_2 - ns1_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
719 dod_exp_3_2 = od_exp_3_2 - nsd_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
720
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
721 % do whitening
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
722 o1w_exp_3_1 = filter(do1_exp_3_1,wf11,plcf) + filter(dod_exp_3_1,wf12,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
723 odw_exp_3_1 = filter(do1_exp_3_1,wf21,plcf) + filter(dod_exp_3_1,wf22,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
724
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
725 o1w_exp_3_2 = filter(do1_exp_3_2,wf11,plcf) + filter(dod_exp_3_2,wf12,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
726 odw_exp_3_2 = filter(do1_exp_3_2,wf21,plcf) + filter(dod_exp_3_2,wf22,plcf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
727
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
728
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
729 %%% Build fit vectors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
730
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
731 o1w_exp_3_1 = o1w_exp_3_1.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
732 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
733 o1w_exp_3_1(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
734 exps(1).fitdata = o1w_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
735
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
736 odw_exp_3_1 = odw_exp_3_1.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
737 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
738 odw_exp_3_1(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
739 exps(2).fitdata = odw_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
740
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
741 o1w_exp_3_2 = o1w_exp_3_2.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
742 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
743 o1w_exp_3_2(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
744 exps(3).fitdata = o1w_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
745
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
746 odw_exp_3_2 = odw_exp_3_2.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
747 % cut the first 100 samples to remove WF transients effects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
748 odw_exp_3_2(1:100,:) = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
749 exps(4).fitdata = odw_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
750
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
751
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
752 %%% do fit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
753 fprintf('===== Do fit - iter %s =====\n',num2str(1))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
754 % [a,Ca,eCa,Corra,eCorra,Vu,bu,Cbu,eCbu,mse] = mdc3_exp1_linfit_v2(exps,groundexps);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
755 [a,Ca,Corra,Vu,bu,Cbu,Fbu,mse] = utils.math.linfitsvd(exps,groundexps);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
756
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
757 % store results
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
758 mdc3_exp3_loop_results(1).a = a;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
759 mdc3_exp3_loop_results(1).Ca = Ca;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
760 % mdc3_exp3_loop_results(1).eCa = eCa;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
761 mdc3_exp3_loop_results(1).Corra = Corra;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
762 % mdc3_exp3_loop_results(1).eCorra = eCorra;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
763 mdc3_exp3_loop_results(1).Vu = Vu;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
764 mdc3_exp3_loop_results(1).bu = bu;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
765 mdc3_exp3_loop_results(1).Cbu = Cbu;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
766 % mdc3_exp3_loop_results(1).eCbu = eCbu;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
767 mdc3_exp3_loop_results(1).mse = mse;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
768
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
769 % update nominal values with fit result
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
770 for kk=1:numel(usedparams)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
771 for dd=1:numel(parnames)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
772 if strcmp(usedparams{kk},parnames{dd})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
773 exp3_nomvalues{dd} = exp3_nomvalues{dd} + a(kk);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
774 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
775 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
776 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
777
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
778 % store parameter estimation
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
779 mdc3_exp3_loop_results(1).params = exp3_nomvalues;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
780
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
781 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
782
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
783
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
784 % %% save results
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
785 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
786 % % get date string
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
787 % str = date;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
788 % % write filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
789 % filenm = sprintf('mdc3_exp3_loop_results_%s.mat',str);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
790 % % save
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
791 % save(['C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\MDC3_Exp3\' filenm], 'mdc3_exp3_loop_results')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
792 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
793 %% MSE progression
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
794
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
795 mseprog = zeros(N,1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
796 for ii=1:N
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
797 mseprog(ii) = mdc3_exp3_loop_results(ii).mse;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
798 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
799
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
800 figure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
801 plot(mseprog,'*-')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
802 xlabel('Fit Step')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
803 ylabel('Meam Square Error')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
804 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
805 % %% Get params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
806 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
807 % fit_vals = zeros(numel(usedparams),1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
808 % true_vals = zeros(numel(usedparams),1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
809 % pars = mdc3_exp3_loop_results(N).params;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
810 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
811 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
812 % for ii=1:numel(usedparams)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
813 % for jj=1:numel(parnames)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
814 % if strcmp(usedparams{ii},parnames{jj})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
815 % fit_vals(ii) = pars{jj};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
816 % true_vals(ii) = exp3_truevalues{jj};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
817 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
818 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
819 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
820 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
821 % %% Testing
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
822 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
823 % % input true values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
824 % dH = true_vals(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
825 % dsH = true_vals(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
826 % dS11 = true_vals(3);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
827 % dS1D = true_vals(4);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
828 % dSD1 = true_vals(5);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
829 % dSDD = true_vals(6);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
830 % dh1 = true_vals(7);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
831 % dsh1 = true_vals(8);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
832 % dh2 = true_vals(9);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
833 % dsh2 = true_vals(10);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
834 % dx1 = true_vals(11);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
835 % dx2 = true_vals(12);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
836 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
837 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
838 % % load nominal and true values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
839 % load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\exp3_2_10perc_nomvalues.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
840 % load C:\Users\Luigi\ltp_data_analysis\MDCs\MDC3\lf_analysis\Models\exp3_2_10perc_truevalues.mat
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
841 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
842 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
843 % %%% get response with true params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
844 % for ii = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
845 % H.objs(ii).setParams(parnames,exp3_truevalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
846 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
847 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
848 % s11 = fftfilt(oi1,H.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
849 % s12 = fftfilt(oid,H.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
850 % s21 = fftfilt(oi1,H.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
851 % s22 = fftfilt(oid,H.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
852 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
853 % % get signals for exp 3.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
854 % s1_exp_3_1 = s11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
855 % s1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
856 % sd_exp_3_1 = s21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
857 % sd_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
858 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
859 % % get signals for exp 3.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
860 % s1_exp_3_2 = s12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
861 % s1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
862 % sd_exp_3_2 = s22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
863 % sd_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
864 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
865 % %%% get response with nominal params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
866 % for kk = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
867 % H.objs(kk).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
868 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
869 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
870 % s11 = fftfilt(oi1,H.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
871 % s12 = fftfilt(oid,H.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
872 % s21 = fftfilt(oi1,H.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
873 % s22 = fftfilt(oid,H.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
874 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
875 % % get signals for exp 3.1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
876 % ns1_exp_3_1 = s11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
877 % ns1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
878 % nsd_exp_3_1 = s21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
879 % nsd_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
880 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
881 % % get signals for exp 3.2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
882 % ns1_exp_3_2 = s12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
883 % ns1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
884 % nsd_exp_3_2 = s22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
885 % nsd_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
886 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
887 % % subtract template from true signals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
888 % ds1_exp_3_1 = s1_exp_3_1 - ns1_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
889 % dsd_exp_3_1 = sd_exp_3_1 - nsd_exp_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
890 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
891 % ds1_exp_3_2 = s1_exp_3_2 - ns1_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
892 % dsd_exp_3_2 = sd_exp_3_2 - nsd_exp_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
893 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
894 % %%% Get fit basis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
895 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
896 % % set nominal values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
897 % for jj = 1:numel(H.objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
898 % T_dH.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
899 % T_dsH.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
900 % T_dS11.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
901 % T_dS1D.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
902 % T_dSD1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
903 % T_dSDD.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
904 % T_dh1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
905 % T_dsh1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
906 % T_dh2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
907 % T_dsh2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
908 % T_dx1.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
909 % T_dx2.objs(jj).setParams(parnames,exp3_nomvalues);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
910 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
911 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
912 % % get response for dH
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
913 % ds11 = fftfilt(oi1,T_dH.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
914 % ds12 = fftfilt(oid,T_dH.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
915 % ds21 = fftfilt(oi1,T_dH.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
916 % ds22 = fftfilt(oid,T_dH.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
917 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
918 % dH_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
919 % dH_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
920 % dH_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
921 % dH_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
922 % dH_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
923 % dH_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
924 % dH_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
925 % dH_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
926 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
927 % % get response for dsH
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
928 % ds11 = fftfilt(oi1,T_dsH.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
929 % ds12 = fftfilt(oid,T_dsH.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
930 % ds21 = fftfilt(oi1,T_dsH.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
931 % ds22 = fftfilt(oid,T_dsH.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
932 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
933 % dsH_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
934 % dsH_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
935 % dsH_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
936 % dsH_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
937 % dsH_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
938 % dsH_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
939 % dsH_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
940 % dsH_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
941 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
942 % % get response for dS11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
943 % ds11 = fftfilt(oi1,T_dS11.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
944 % ds12 = fftfilt(oid,T_dS11.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
945 % ds21 = fftfilt(oi1,T_dS11.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
946 % ds22 = fftfilt(oid,T_dS11.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
947 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
948 % dS11_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
949 % dS11_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
950 % dS11_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
951 % dS11_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
952 % dS11_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
953 % dS11_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
954 % dS11_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
955 % dS11_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
956 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
957 % % get response for dS1D
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
958 % ds11 = fftfilt(oi1,T_dS1D.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
959 % ds12 = fftfilt(oid,T_dS1D.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
960 % ds21 = fftfilt(oi1,T_dS1D.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
961 % ds22 = fftfilt(oid,T_dS1D.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
962 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
963 % dS1D_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
964 % dS1D_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
965 % dS1D_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
966 % dS1D_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
967 % dS1D_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
968 % dS1D_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
969 % dS1D_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
970 % dS1D_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
971 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
972 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
973 % % get response for SD1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
974 % ds11 = fftfilt(oi1,T_dSD1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
975 % ds12 = fftfilt(oid,T_dSD1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
976 % ds21 = fftfilt(oi1,T_dSD1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
977 % ds22 = fftfilt(oid,T_dSD1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
978 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
979 % dSD1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
980 % dSD1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
981 % dSD1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
982 % dSD1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
983 % dSD1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
984 % dSD1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
985 % dSD1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
986 % dSD1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
987 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
988 % % get response for SDD
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
989 % ds11 = fftfilt(oi1,T_dSDD.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
990 % ds12 = fftfilt(oid,T_dSDD.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
991 % ds21 = fftfilt(oi1,T_dSDD.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
992 % ds22 = fftfilt(oid,T_dSDD.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
993 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
994 % dSDD_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
995 % dSDD_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
996 % dSDD_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
997 % dSDD_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
998 % dSDD_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
999 % dSDD_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1000 % dSDD_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1001 % dSDD_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1002 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1003 % % get response for dh1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1004 % ds11 = fftfilt(oi1,T_dh1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1005 % ds12 = fftfilt(oid,T_dh1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1006 % ds21 = fftfilt(oi1,T_dh1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1007 % ds22 = fftfilt(oid,T_dh1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1008 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1009 % dh1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1010 % dh1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1011 % dh1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1012 % dh1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1013 % dh1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1014 % dh1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1015 % dh1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1016 % dh1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1017 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1018 % % get response for dsh1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1019 % ds11 = fftfilt(oi1,T_dsh1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1020 % ds12 = fftfilt(oid,T_dsh1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1021 % ds21 = fftfilt(oi1,T_dsh1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1022 % ds22 = fftfilt(oid,T_dsh1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1023 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1024 % dsh1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1025 % dsh1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1026 % dsh1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1027 % dsh1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1028 % dsh1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1029 % dsh1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1030 % dsh1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1031 % dsh1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1032 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1033 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1034 % % get response for dh2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1035 % ds11 = fftfilt(oi1,T_dh2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1036 % ds12 = fftfilt(oid,T_dh2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1037 % ds21 = fftfilt(oi1,T_dh2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1038 % ds22 = fftfilt(oid,T_dh2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1039 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1040 % dh2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1041 % dh2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1042 % dh2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1043 % dh2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1044 % dh2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1045 % dh2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1046 % dh2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1047 % dh2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1048 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1049 % % get response for dsh2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1050 % ds11 = fftfilt(oi1,T_dsh2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1051 % ds12 = fftfilt(oid,T_dsh2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1052 % ds21 = fftfilt(oi1,T_dsh2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1053 % ds22 = fftfilt(oid,T_dsh2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1054 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1055 % dsh2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1056 % dsh2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1057 % dsh2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1058 % dsh2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1059 % dsh2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1060 % dsh2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1061 % dsh2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1062 % dsh2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1063 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1064 % % get response for dx1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1065 % ds11 = fftfilt(oi1,T_dx1.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1066 % ds12 = fftfilt(oid,T_dx1.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1067 % ds21 = fftfilt(oi1,T_dx1.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1068 % ds22 = fftfilt(oid,T_dx1.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1069 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1070 % dx1_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1071 % dx1_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1072 % dx1_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1073 % dx1_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1074 % dx1_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1075 % dx1_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1076 % dx1_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1077 % dx1_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1078 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1079 % % get response for dx2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1080 % ds11 = fftfilt(oi1,T_dx2.objs(1,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1081 % ds12 = fftfilt(oid,T_dx2.objs(1,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1082 % ds21 = fftfilt(oi1,T_dx2.objs(2,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1083 % ds22 = fftfilt(oid,T_dx2.objs(2,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1084 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1085 % dx2_1_exp_3_1 = ds11;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1086 % dx2_1_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1087 % dx2_12_exp_3_1 = ds21;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1088 % dx2_12_exp_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1089 % dx2_1_exp_3_2 = ds12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1090 % dx2_1_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1091 % dx2_12_exp_3_2 = ds22;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1092 % dx2_12_exp_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1093 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1094 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1095 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1096 % %%% Get model response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1097 % mod1_3_1 = dH_1_exp_3_1.*dH + dsH_1_exp_3_1.*dsH + dS11_1_exp_3_1.*dS11 + dS1D_1_exp_3_1.*dS1D +...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1098 % dSD1_1_exp_3_1.*dSD1 + dSDD_1_exp_3_1.*dSDD + dh1_1_exp_3_1.*dh1 + dsh1_1_exp_3_1.*dsh1 + ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1099 % dh2_1_exp_3_1.*dh2 + dsh2_1_exp_3_1.*dsh2 + dx1_1_exp_3_1.*dx1 + dx2_1_exp_3_1.*dx2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1100 % mod1_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1101 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1102 % mod12_3_1 = dH_12_exp_3_1.*dH + dsH_12_exp_3_1.*dsH + dS11_12_exp_3_1.*dS11 + dS1D_12_exp_3_1.*dS1D +...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1103 % dSD1_12_exp_3_1.*dSD1 + dSDD_12_exp_3_1.*dSDD + dh1_12_exp_3_1.*dh1 + dsh1_12_exp_3_1.*dsh1 + ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1104 % dh2_12_exp_3_1.*dh2 + dsh2_12_exp_3_1.*dsh2 + dx1_12_exp_3_1.*dx1 + dx2_12_exp_3_1.*dx2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1105 % mod12_3_1.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1106 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1107 % mod1_3_2 = dH_1_exp_3_2.*dH + dsH_1_exp_3_2.*dsH + dS11_1_exp_3_2.*dS11 + dS1D_1_exp_3_2.*dS1D +...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1108 % dSD1_1_exp_3_2.*dSD1 + dSDD_1_exp_3_2.*dSDD + dh1_1_exp_3_2.*dh1 + dsh1_1_exp_3_2.*dsh1 + ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1109 % dh2_1_exp_3_2.*dh2 + dsh2_1_exp_3_2.*dsh2 + dx1_1_exp_3_2.*dx1 + dx2_1_exp_3_2.*dx2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1110 % mod1_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1111 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1112 % mod12_3_2 = dH_12_exp_3_2.*dH + dsH_12_exp_3_2.*dsH + dS11_12_exp_3_2.*dS11 + dS1D_12_exp_3_2.*dS1D +...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1113 % dSD1_12_exp_3_2.*dSD1 + dSDD_12_exp_3_2.*dSDD + dh1_12_exp_3_2.*dh1 + dsh1_12_exp_3_2.*dsh1 + ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1114 % dh2_12_exp_3_2.*dh2 + dsh2_12_exp_3_2.*dsh2 + dx1_12_exp_3_2.*dx1 + dx2_12_exp_3_2.*dx2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1115 % mod12_3_2.setName;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1116 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1117 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1118 % %% plot
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1119 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1120 % i1o1lin = mod1_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1121 % i1o1lin.setName('i1->o1 lin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1122 % i1oDlin = mod12_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1123 % i1oDlin.setName('i1->oD lin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1124 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1125 % iDo1lin = mod1_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1126 % iDo1lin.setName('iD->o1 lin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1127 % iDoDlin = mod12_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1128 % iDoDlin.setName('iD->oD lin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1129 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1130 % i1o1nlin = s1_exp_3_1-ns1_exp_3_1-mod1_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1131 % i1o1nlin.setName('i1->o1 nlin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1132 % i1oDnlin = sd_exp_3_1-nsd_exp_3_1-mod12_3_1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1133 % i1oDnlin.setName('i1->oD nlin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1134 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1135 % iDo1nlin = s1_exp_3_2-ns1_exp_3_2-mod1_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1136 % iDo1nlin.setName('iD->o1 nlin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1137 % iDoDnlin = sd_exp_3_2-nsd_exp_3_2-mod12_3_2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1138 % iDoDnlin.setName('iD->oD nlin');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1139 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1140 % iplot(i1o1lin,i1o1nlin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1141 % iplot(i1oDlin,i1oDnlin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1142 % iplot(iDo1lin,iDo1nlin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1143 % iplot(iDoDlin,iDoDnlin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1144 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1145 % %% Get Euclidean Norm
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1146 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1147 % n1lin = norm(i1o1lin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1148 % n2lin = norm(i1oDlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1149 % n3lin = norm(iDo1lin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1150 % n4lin = norm(iDoDlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1151 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1152 % n1nlin = norm(i1o1nlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1153 % n2nlin = norm(i1oDnlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1154 % n3nlin = norm(iDo1nlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1155 % n4nlin = norm(iDoDnlin.y);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1156 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1157
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1158
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1159
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1160
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1161
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1162
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1163
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1164
|