IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
integrate.m
Go to the documentation of this file.
1 %>@ingroup maths
2 %>@file
3 %>brief Accumulated sum of the columns of @c X
4 %>
5 %> Does the same as MATLAB cumsum().
6 %
7 %> @param X
8 %> @return I
9 function I = integrate(X)
10 
11 [no, no_t] = size(X);
12 I = zeros(no, no_t);
13 ii = 0;
14 for i = 1:no_t
15  if i == 1
16  I(:, i) = X(:, i);
17  else
18  I(:, i) = I(:, i-1)+X(:, i);
19  end;
20 %
21 % ii = ii+1;
22 % if ii == 10
23 % fprintf('.');
24 % ii = 0;
25 % end;
26 end;
Analysis Session (AS) base class.
Definition: as.m:6
function integrate(in X)