16 lines
293 B
Objective-C
16 lines
293 B
Objective-C
function I = calc_block_integral(tau, m)
|
|
|
|
if (~exist('m', 'var'))
|
|
m = 1;
|
|
end
|
|
|
|
if tau < 0
|
|
I = 0;
|
|
else
|
|
syms x f;
|
|
f = (x - tau) ^ 2 * exp(-x ^ 2/2) * x ^ (m - 1) / (2 ^ (m/2 - 1) * gamma(m/2));
|
|
I = double(int(f, [tau, +inf]));
|
|
end
|
|
|
|
end
|