IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
orhistgui_view2.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Draws datasets in orhistgui
4 %
5 %> @param flag_msg=1 Whether to alarm about incompatible dataset
6 function orhistgui_view2(flag_msg)
7 handles = orhistgui_find_handles();
8 global FONTSIZE;
9 temp = FONTSIZE;
10 
11 if nargin < 1 || isempty(flag_msg)
12  flag_msg = 1;
13 end;
14 
15 try
16  flag_continue = 1;
17  sdata = listbox_get_selected_1stname(handles.popupmenu_data);
18  if isempty(sdata)
19  if flag_msg
20  irerror('Dataset not specified!');
21  else
22  flag_continue = 0;
23  end;
24  end;
25 
26  if flag_continue
27  data = evalin('base', [sdata, ';']);
28 
29  % Makes a dataset with the removed rows
30  blk = handles.remover;
31 
32  if data.no ~= blk.no
33  if flag_msg
34  irerror(sprintf('Selected dataset has an incompatible number of rows: actual: %d; expected: %d', data.no, blk.no));
35  else
36  flag_continue = 0;
37  end;
38  end;
39 
40  if flag_continue
41  map_out = 1:data.no;
42  map_out(blk.map) = [];
43  dsin = data.map_rows(blk.map);
44  dsout = data.map_rows(map_out);
45 
46  FONTSIZE = 15; %#ok<*NASGU>
47  ov = vis_alldata();
48 
49  axes(handles.axes2); %#ok<*MAXES>
50  hold off;
51  ov.use(dsin);
52  title('Rows remaining');
53 
54  axes(handles.axes3);
55  hold off;
56  ov.use(dsout);
57  title('Rows removed');
58 
59  FONTSIZE = temp;
60  end;
61  end;
62 catch ME
63  FONTSIZE = temp;
64  send_error(ME);
65 end;
function send_error(in ME)
Visualization - All curves in dataset.
Definition: vis_alldata.m:2
function irerror(in s)
function orhistgui_find_handles()
function listbox_get_selected_1stname(in h_listbox)
function orhistgui_view2(in flag_msg)
function orhistgui(in varargin)