TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
Bulk_plot.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 Bulk_plot.m
17 %> @brief Plots a bulk signal: for each signal of the bulk signal, creates a figure and
18 %> displays the signal
19 %
20 %> @param BulkSig the bulk signal
21 %> @param title the optional title
22 
23 function Bulk_plot(BulkSig, title)
24 %Copyright Frank Villaro-Dixon, 2014
25 
26 
27 %IF MULTIPLE EPOCHS
28 if(size(BulkSig, 2) ~= 1)
29  warning(['Displaying all the epochs (=' num2str(size(BulkSig, 2)) ')']);
30  for i = [1:size(BulkSig, 2)]
31  title = ['Epoch ' num2str(i)];
32  Bulk_plot(BulkSig(i), title);
33  end
34  return;
35 end
36 
37 %IF ONE EPOCH
38 Bulk_assert_mine(BulkSig);
39 
40 Signals = Bulk_get_signals(BulkSig);
41 
42 nsigs = size(Signals);
43 nsigs = nsigs(1); %the number of signals we have
44 
45 nsubplots = ceil(sqrt(nsigs)); %The number of subplots we have. Not efficient…
46 
47 if(nargin == 1)
48  title = 'Bulk signal';
49 end
50 
51 figure('name', title);
52 
53 for isig = [1:nsigs]
54  SignalStr = Signals(isig, :);
55  Signal = Bulk_get_signal(BulkSig, SignalStr);
56  subplot(nsubplots, nsubplots, isig);
57  Signal_plot(Signal);
58 end
59 
60 
Bulk_get_signals
function Bulk_get_signals(in BulkSig)
Bulk_assert_mine
function Bulk_assert_mine(in BulkSignal)
Bulk_plot
function Bulk_plot(in BulkSig, in title)
Signal_plot
function Signal_plot(in Signal, in startT, in endT)
Bulk_get_signal
function Bulk_get_signal(in BulkSignal, in typeWanted)