IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
make_one.m
Go to the documentation of this file.
1 %> @brief Makes one block from many
2 %> @file
3 %> @ingroup misc conversion
4 %>
5 %> Iterates throught the cell of blocks. If an element is a @ref block_cascade_base, extracts its blocks; otherwise adds the element
6 %
7 %> @param cob Cell of blocks
8 %> @return one a @ref block_cascade_base block
9 function one = make_one(cob)
10 
11 one = block_cascade_base();
12 
13 for i = 1:numel(cob)
14  b = cob{i};
15  if isa(b, 'block_cascade_base')
16  one.blocks = [one.blocks, b.blocks];
17  else
18  one.blocks{end+1} = b;
19  end;
20 end;
Base Block class.
Definition: block.m:2
function make_one(in cob)
Cascade block: sequence of blocks represented by a block.