TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
Signal__set_raw.m
Go to the documentation of this file.
1 %This file is part of TEAP.
2 %
3 %TEAP is free software: you can redistribute it and/or modify
4 %it under the terms of the GNU General Public License as published by
5 %the Free Software Foundation, either version 3 of the License, or
6 %(at your option) any later version.
7 %
8 %TEAP is distributed in the hope that it will be useful,
9 %but WITHOUT ANY WARRANTY; without even the implied warranty of
10 %MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 %GNU General Public License for more details.
12 %
13 %You should have received a copy of the GNU General Public License
14 %along with TEAP. If not, see <http://www.gnu.org/licenses/>.
15 %
16 %> @file Signal__set_raw.m
17 %> @brief Sets the raw data of the signal S
18 function Signal = Signal__set_raw(Signal, raw)
19 
20 if(nargin ~= 2)
21  error('Usage: Signal = Signal__set_raw(Signal, raw)');
22 end
23 
24 if(nargout ~= 1)
25  error('You need to retrieve the function''s result. Else, it''s useless !');
26 end
27 
28 Signal__assert_mine(Signal);
29 
30 Signal.raw = double(raw);
31 
32 %!error(Signal__set_raw())
33 %!error(Signal__set_raw(42))
34 %!error(Signal__set_raw(42, [1 2 3 4]))
35 %!error(Signal__set_raw(Signal__new_empty(), [1 2 3 4])) %No result retreived
36 %!assert(Signal__set_raw(Signal__new_empty(), [1 2 3 4]).raw, [1 2 3 4])
37 
Signal__set_raw
function Signal__set_raw(in Signal, in raw)
Signal__new_empty
function Signal__new_empty()
Signal__assert_mine
function Signal__assert_mine(in Signal)