Skip to content

Commit 2b5afba

Browse files
committed
end; --> end
1 parent 83eea93 commit 2b5afba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+275
-275
lines changed

src/f_SCR.m

+19-19
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@
8989
[s, dsdx(k)] = sigm(aTheta(k, 2), sig);
9090
aTheta(k, 2) = s + sigma_offset;
9191
aTheta(k, 3) = exp(aTheta(k, 3));
92-
end;
92+
end
9393
if any(isinf(aTheta(:, 3)))
9494
aTheta(isinf(aTheta(:, 3)), 3) = 1e200; % an arbitrary value way below realmax
95-
end;
95+
end
9696
clear sig m s
9797
else
9898
aTheta = [];
9999
aSCR_s = 5;
100-
end;
100+
end
101101

102102
% - event-related responses
103103
if ut(3) > 0
@@ -109,11 +109,11 @@
109109
eTheta(:, 3) = exp(Theta((Theta_n + 3 * ut(2)) + (1:ut(3))));
110110
if any(isinf(eTheta(:, 3)))
111111
eTheta(isinf(eTheta(:, 3)), 3) = 1e200;
112-
end;
112+
end
113113
else
114114
eTheta = [];
115115
eSCR_o = aSCR_s(end);
116-
end;
116+
end
117117

118118
% - spontaneous fluctuations
119119
if ut(4) > 0
@@ -125,13 +125,13 @@
125125
sig.G0 = ut(SF_ub(k)) - ut(SF_lb(k));
126126
[t, dtdx(k)] = sigm(Theta(Theta_n + 3 * ut(2) + ut(3) + (k - 1) * 2 + 1), sig);
127127
sfTheta(k, 1) = ut(SF_lb(k)) + t; % lower bound plus parameter vaue
128-
end;
128+
end
129129
sfTheta(:, 2) = sigma;
130130
sfTheta(:, 3) = exp(Theta((Theta_n + 3 * ut(2) + ut(3)) + (2:2:(2 * ut(4)))));
131131
else
132132
sfTheta = [];
133133
SF_ub = eSCR_o;
134-
end;
134+
end
135135

136136
% - SCL changes
137137
if ut(5) > 0
@@ -143,12 +143,12 @@
143143
sig.G0 = ut(SCL_ub(k)) - ut(SCL_lb(k));
144144
[t, dtscldx(k)] = sigm(Theta(Theta_n + 3 * ut(2) + ut(3) + 2 * ut(4) + (k - 1) * 2 + 1), sig);
145145
SCLtheta(k, 1) = ut(SCL_lb(k)) + t; % lower bound plus parameter vaue
146-
end;
146+
end
147147
SCLtheta(:, 2) = sigma_SCL;
148148
SCLtheta(:, 3) = Theta((Theta_n + 3 * ut(2) + ut(3)) + 2 * ut(4) + (2:2:(2 * ut(5))));
149149
else
150150
SCLtheta = [];
151-
end;
151+
end
152152

153153
% ODE
154154
% ------------------------------------------------------------------------
@@ -190,33 +190,33 @@
190190
Jp(3, 7 + (1:3:(3 * ut(2)))) = gu(ut(1), aTheta, 0) .* (ut(1) - aTheta(:, 1)) .* (aTheta(:, 2)).^-2 .* dmdx;
191191
Jp(3, 7 + (2:3:(3 * ut(2)))) = gu(ut(1), aTheta, 0) .* (ut(1) - aTheta(:, 1)).^2 .* (aTheta(:, 2)).^-3 .* dsdx;
192192
Jp(3, 7 + (3:3:(3 * ut(2)))) = gu(ut(1), aTheta, 0);
193-
end;
193+
end
194194

195195
if ~isempty(eTheta)
196196
Jp(3, (7 + 3 * ut(2)) + (1:ut(3))) = gu(ut(1), eTheta, 0);
197-
end;
197+
end
198198

199199
if ~(isempty(eTheta) && isempty(aTheta))
200200
allTheta = [eTheta; aTheta];
201201
Jp(3, 4) = sum(gu(ut(1), allTheta, 0) .* 1./(allTheta(:, 2).^2) .* (ut(1) - allTheta(:, 1)) .* exp(Theta(4)));
202-
end;
202+
end
203203

204204
if ~isempty(sfTheta)
205205
Jp(6, (7 + 3 * ut(2) + ut(3)) + (1:2:(2 * ut(4)))) = gu(ut(1), sfTheta, 0) .* (ut(1) - sfTheta(:, 1)) .* sfTheta(:, 2).^-2 .* dtdx;
206206
Jp(6, (7 + 3 * ut(2) + ut(3)) + (2:2:(2 * ut(4)))) = gu(ut(1), sfTheta, 0);
207-
end;
207+
end
208208

209209
if ~isempty(SCLtheta)
210210
Jp(7, (7 + 3 * ut(2) + ut(3)) + 2 * ut(4) + (1:2:(2 * ut(5)))) = gu(ut(1), SCLtheta, 0) .* 1./(sigma_SCL.^2) .* (ut(1) - SCLtheta(:, 1)) .* dtscldx;
211211
SCLtheta(:, 3) = 1; % we don't take the exp(amp) here, so dSCLdamp = gu for unit amplitude
212212
Jp(7, (7 + 3 * ut(2) + ut(3)) + 2 * ut(4) + (2:2:(2 * ut(5)))) = gu(ut(1), SCLtheta, 0);
213-
end;
213+
end
214214

215215
dfdP = dt .* Jp';
216216

217-
if any(isweird(fx(:))), error('Weird values in f_SCR'); end;
218-
if any(isweird(dfdx(:))), error('Weird values in f_SCR'); end;
219-
if any(isweird(dfdP(:))), error('Weird values in f_SCR'); end;
217+
if any(isweird(fx(:))), error('Weird values in f_SCR'); end
218+
if any(isweird(dfdx(:))), error('Weird values in f_SCR'); end
219+
if any(isweird(dfdP(:))), error('Weird values in f_SCR'); end
220220

221221

222222
return;
@@ -237,10 +237,10 @@
237237
gu = a .* exp(-(ut - mu).^2 ./ (2 .* sigma.^2));
238238
if f
239239
gu = sum(gu);
240-
end;
240+
end
241241
else
242242
gu = 0;
243-
end;
243+
end
244244
return;
245245

246246
% =========================================================================

src/f_SF.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
%% initialise
2525
global settings;
26-
if isempty(settings), pspm_init; end;
26+
if isempty(settings), pspm_init; end
2727
% settings
2828
Theta_n = 3; % number of parameters for the peripheral function (the rest is for the neural function)
2929
try
@@ -45,10 +45,10 @@
4545
sfTheta(n, 1) = Theta((n - 1) * 2 + Theta_n + 1);
4646
sfTheta(n, 2) = sigma;
4747
sfTheta(n, 3) = exp(Theta((n - 1) * 2 + Theta_n + 2));
48-
end;
48+
end
4949
else
5050
sfTheta = [];
51-
end;
51+
end
5252
% ODE 3rd order + gaussian
5353
xdot = [Xt(2)
5454
Xt(3)
@@ -72,8 +72,8 @@
7272
gu = a .* exp(-(ut - mu).^2 ./ (2 .* sigma.^2));
7373
if f
7474
gu = sum(gu);
75-
end;
75+
end
7676
else
7777
gu = 0;
78-
end;
78+
end
7979
return;

src/pspm_bf_hprf_e.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
%% input checks
2727
global settings;
28-
if isempty(settings), pspm_init; end;
28+
if isempty(settings), pspm_init; end
2929
if nargin < 1
3030
errmsg = 'No sampling interval stated'; warning('ID:invalid_input', errmsg); return;
31-
end;
31+
end
3232
varargin = cell2mat(varargin);
3333
if length(varargin)==1
3434
b=1:6;
@@ -48,7 +48,7 @@
4848
warning('ID:invalid_input', 'Time resolution is larger than duration of the function.'); return;
4949
elseif td == 0
5050
warning('ID:invalid_input', 'Time resolution must be larger than 0.'); return;
51-
end;
51+
end
5252

5353
x = (0:td:50-td);
5454
bf=[];

src/pspm_bf_hprf_fc_f.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
%% initialise
1414
global settings;
15-
if isempty(settings), pspm_init; end;
15+
if isempty(settings), pspm_init; end
1616
if nargin < 1
1717
errmsg = 'No sampling interval stated'; warning('ID:invalid_input',errmsg); return;
18-
end;
18+
end
1919
if nargin < 2
2020
soa = 3.5;
21-
end;
21+
end
2222
if nargin < 3
2323
% table 2 row 3 in Castegnetti et al. 2016
2424
%p=[43.2180170215633,0.195621916215104,-6.9671,81.0383536117737];
@@ -30,7 +30,7 @@
3030
% before
3131
% amplitude does not matter because it will be downscaled to 1 by the
3232
% calling function
33-
end;
33+
end
3434
x0 = p(3);
3535
b = p(2);
3636
a = p(1);
@@ -49,7 +49,7 @@
4949
elseif soa > 8
5050
warning(['SOA longer than 8s is not recommended. ', ...
5151
'Use at own risk.']);
52-
end;
52+
end
5353
shift = soa + x0;
5454
x = (start:td:stop-td)';
5555
% try not to use stats toolbox, but stats toolbox has very good

src/pspm_bf_ldrf_gu.m

+17-17
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
%% initialise
2929
global settings
30-
if isempty(settings), pspm_init; end;
30+
if isempty(settings), pspm_init; end
3131
%% set defaults
3232
p = [0.27, 2.04, 1.48, 0.004]; % p = [sigma lambda1 lambda2 a]
3333
n = 20;
@@ -40,21 +40,21 @@
4040
elseif nargin == 1
4141
n_el = numel(varargin{1});
4242
td = varargin{1}(1);
43-
if n_el > 1, n = varargin{1}(2); end;
44-
if n_el > 2, offset = varargin{1}(3); end;
45-
if n_el > 3, p(1) = varargin{1}(4); end;
46-
if n_el > 4, p(2) = varargin{1}(5); end;
47-
if n_el > 5, p(3) = varargin{1}(6); end;
48-
if n_el > 6, p(4) = varargin{1}(7); end;
43+
if n_el > 1, n = varargin{1}(2); end
44+
if n_el > 2, offset = varargin{1}(3); end
45+
if n_el > 3, p(1) = varargin{1}(4); end
46+
if n_el > 4, p(2) = varargin{1}(5); end
47+
if n_el > 5, p(3) = varargin{1}(6); end
48+
if n_el > 6, p(4) = varargin{1}(7); end
4949
elseif nargin > 1
5050
td = varargin{1};
5151
n = varargin{2};
52-
if nargin > 2, offset = varargin{3}; end;
53-
if nargin > 3, p(1) = varargin{4}; end;
54-
if nargin > 4, p(2) = varargin{5}; end;
55-
if nargin > 5, p(3) = varargin{6}; end;
56-
if nargin > 5, p(4) = varargin{7}; end;
57-
end;
52+
if nargin > 2, offset = varargin{3}; end
53+
if nargin > 3, p(1) = varargin{4}; end
54+
if nargin > 4, p(2) = varargin{5}; end
55+
if nargin > 5, p(3) = varargin{6}; end
56+
if nargin > 5, p(4) = varargin{7}; end
57+
end
5858
if td > n
5959
warning('ID:invalid_input', 'Time resolution is larger than or equal to the duration of the function.'); return;
6060
elseif td == 0
@@ -63,7 +63,7 @@
6363
warning('ID:invalid_input', 'Offset has to be a positive number.'); return;
6464
elseif n <= 0
6565
warning('ID:invalid_input', 'Duration has to be a number larger then 0.'); return;
66-
end;
66+
end
6767
%% check if offset is in a valid range or correct it if it is to small
6868
if offset ~= 0
6969
r = td/offset;
@@ -73,9 +73,9 @@
7373
offset = 0;
7474
elseif r <= 2
7575
offset = td;
76-
end;
77-
end;
78-
end;
76+
end
77+
end
78+
end
7979
%% create x axis
8080
bf_dur = n;
8181
n_bf = round((bf_dur)/td);

src/pspm_bf_rarf_e.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
%% initialise
2121
global settings
22-
if isempty(settings), pspm_init; end;
22+
if isempty(settings), pspm_init; end
2323
%% check input arguments
2424
if nargin==0
2525
errmsg='No sampling interval stated'; warning('ID:invalid_input', errmsg); return;
26-
end;
26+
end
2727
%% load arguments/parameters
2828
td = varargin{1}(1);
2929
if numel(varargin{1}) == 1 && nargin == 1
@@ -32,11 +32,11 @@
3232
bf_type = varargin{1}(2);
3333
else
3434
bf_type = varargin{2}(1);
35-
end;
35+
end
3636
%% fix value of bf_type
3737
if (bf_type<0)||(bf_type>1)
3838
bf_type = 1;
39-
end;
39+
end
4040
%% other variables
4141
mu = 8.07;
4242
sigma = 3.74;
@@ -48,12 +48,12 @@
4848
elseif td == 0
4949
warning('ID:invalid_input', 'Time resolution must be larger than 0.');
5050
return;
51-
end;
51+
end
5252
x = (start:td:stop-td)';
5353
bs = exp(-(x-mu).^2./(2*sigma^2));
5454
if bf_type == 1
5555
bs = [bs [diff(bs); 0]];
56-
end;
56+
end
5757
%% orthogonalise
5858
bs = spm_orth(bs);
5959
% normalise

src/pspm_bf_rprf_e.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
%% initialise
2323
global settings
24-
if isempty(settings), pspm_init; end;
24+
if isempty(settings), pspm_init; end
2525
%% check input arguments
2626
if nargin==0
2727
errmsg='No sampling interval stated'; warning('ID:invalid_input', errmsg); return;
28-
end;
28+
end
2929
%% load arguments/parameters
3030
td = varargin{1}(1);
3131
if numel(varargin{1}) == 1 && nargin == 1
@@ -34,11 +34,11 @@
3434
bf_type = varargin{1}(2);
3535
else
3636
bf_type = varargin{2}(1);
37-
end;
37+
end
3838
%% fix value of bf_type
3939
if (bf_type<0)||(bf_type>1)
4040
bf_type = 0;
41-
end;
41+
end
4242
%% other variables
4343
mu = 4.2;
4444
sigma = 1.65;

src/pspm_bf_scrf.m

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,36 @@
1919

2020
%% initialise
2121
global settings
22-
if isempty(settings), pspm_init; end;
22+
if isempty(settings), pspm_init; end
2323
%% check input arguments
2424
if nargin==0
2525
errmsg='No sampling interval stated'; warning('ID:invalid_input', errmsg); return;
26-
end;
26+
end
2727
td = varargin{1}(1);
2828
if numel(varargin{1}) == 1 && nargin == 1
2929
d = 0;
3030
elseif numel(varargin{1}) == 2
3131
d = varargin{1}(2);
3232
else
3333
d = varargin{2}(1);
34-
end;
34+
end
3535
if td > 90
3636
warning('ID:invalid_input', 'Time resolution is larger than duration of the function.'); return;
3737
elseif td == 0
3838
warning('ID:invalid_input', 'Time resolution must be larger than 0.'); return;
39-
end;
40-
if (d<0)||(d>2), d=0; end;
39+
end
40+
if (d<0)||(d>2), d=0; end
4141
%% get parameters and basis function
4242
[bs(:, 1), p, x] = pspm_bf_scrf_f(td);
4343
if d>0
4444
bs(:, 2) = [0; diff(bs(:,1))];
4545
bs(:, 2) = bs(:,2)/sum(abs(bs(:,2)));
46-
end;
46+
end
4747
if d>1
4848
p(2) = 1.8 * p(2);
4949
bs(:, 3) = bs(:, 1) - pspm_bf_scrf_f(td, p);
5050
bs(:, 3) = bs(:, 3)/sum(abs(bs(:, 3)));
51-
end;
51+
end
5252
% orthogonalize
5353
bs=spm_orth(bs);
5454
% normalise

src/pspm_bf_scrf_f.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
%% initialise
1919
global settings;
20-
if isempty(settings), pspm_init; end;
20+
if isempty(settings), pspm_init; end
2121
%% processing
2222
if nargin < 1
2323
errmsg='No sampling interval stated'; warning('ID:invalid_input', errmsg); return;

0 commit comments

Comments
 (0)