Initial commit
[pftoolbox.git] / GUI / xsymbolic_expr2obj.m
blob9644aac0cd6440b6997f625f4c40459c4e844d49
1 function bool=xsymbolic_expr2obj(hf)\r
2 % Sorry, I didn't have enough time to write nice and documented GUI code.\r
3 \r
4 % Toolbox for nonlinear filtering.\r
5 % Copyright (C) 2005  Jakob Rosén <jakob.rosen@gmail.com>\r
6 %\r
7 % This program is free software; you can redistribute it and/or\r
8 % modify it under the terms of the GNU General Public License\r
9 % as published by the Free Software Foundation; either version 2\r
10 % of the License, or (at your option) any later version.\r
11 %\r
12 % This program is distributed in the hope that it will be useful,\r
13 % but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 % GNU General Public License for more details.\r
16 %\r
17 % You should have received a copy of the GNU General Public License\r
18 % along with this program; if not, write to the Free Software\r
19 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\r
21 handles=guidata(hf);\r
22 expression=handles.expression;\r
24 % We already do this check in the main function now. Can be removed when there's time...\r
25 for i=1:length(expression);\r
26         if isempty(expression{i})\r
27                 msgbox('Subexpressions can not be empty!');\r
28                 bool=false;\r
29                 return;\r
30         end\r
31 end;\r
33 obj=handles.obj;\r
34 set(obj,'expression',expression);\r
35 handles.obj=obj;\r
36 guidata(hf,handles);\r
37 bool=true;\r