diff --git a/code/machine_learning/ml_trainlda.m b/code/machine_learning/ml_trainlda.m index 15d28b15..e010cd62 100644 --- a/code/machine_learning/ml_trainlda.m +++ b/code/machine_learning/ml_trainlda.m @@ -161,4 +161,5 @@ w = (mu{2} - mu{1}) / sig_both; w = w / (mu{2}*w' - mu_both*w'); model = struct('w',{w}, 'b',{mu_both*w'}, 'classes',{classes},'featuremask',{retain},'lams',{lams}); + 1; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/Contents.m b/dependencies/PropertyGrid-2010-09-16-mod/Contents.m index 715427c7..0d9c6d38 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/Contents.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/Contents.m @@ -31,8 +31,8 @@ % javaStringArray - Converts a MatLab cell array of strings into a java.lang.String array. % % String utility functions -% strjoin - Concatenates a cell array of strings. -% strsplit - Splits a string into a cell array of strings. +% strjoin2 - Concatenates a cell array of strings. +% strsplit2 - Splits a string into a cell array of strings. % var2str - Textual representation of any MatLab value. % strsetmatch - Indicator of which elements of a universal set are in a particular set. % diff --git a/dependencies/PropertyGrid-2010-09-16-mod/JidePropertyGridField.m b/dependencies/PropertyGrid-2010-09-16-mod/JidePropertyGridField.m index e3d70224..731cd202 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/JidePropertyGridField.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/JidePropertyGridField.m @@ -242,7 +242,7 @@ % find the JidePropertyGridField with the given dot-notated name in an array function self = FindByName(selfarray, name) - self = selfarray.FindByNameRecurse(strsplit(name, '.')); + self = selfarray.FindByNameRecurse(strsplit2(name, '.')); end % deallocate registered editor context guts diff --git a/dependencies/PropertyGrid-2010-09-16-mod/PropertyGrid.m b/dependencies/PropertyGrid-2010-09-16-mod/PropertyGrid.m index 78b37e57..9ffac0dc 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/PropertyGrid.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/PropertyGrid.m @@ -387,9 +387,9 @@ function OnKeyPressed(obj, event) name = PropertyGrid.GetSelectedProperty(obj); self = PropertyGrid.FindPropertyGrid(obj, 'Table'); if ~isempty(name) && ~isempty(self.BoundItem) % help - nameparts = strsplit(name, '.'); + nameparts = strsplit2(name, '.'); if numel(nameparts) > 1 - helpobject = nestedfetch(self.BoundItem, strjoin('.', nameparts(1:end-1))); + helpobject = nestedfetch(self.BoundItem, strjoin2('.', nameparts(1:end-1))); else helpobject = self.BoundItem; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/PropertyGridField.m b/dependencies/PropertyGrid-2010-09-16-mod/PropertyGridField.m index fa52460f..0b2aaa1a 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/PropertyGridField.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/PropertyGridField.m @@ -384,7 +384,7 @@ function WireHierarchy(selfarray, descendants) % hu.bme.aut.www (not a direct child) names = getclassfield(selfarray, 'Name'); if iscell(filterprefix) - prefix = [strjoin('.', filterprefix) '.']; + prefix = [strjoin2('.', filterprefix) '.']; else prefix = [filterprefix '.']; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/PropertyType.m b/dependencies/PropertyGrid-2010-09-16-mod/PropertyType.m index 95732b39..eda83a55 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/PropertyType.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/PropertyType.m @@ -249,7 +249,7 @@ end case 'cellstr' if ~isempty(value) - javavalue = java.lang.String(strjoin(sprintf('\n'), value)); + javavalue = java.lang.String(strjoin2(sprintf('\n'), value)); else javavalue = java.lang.String(); end @@ -314,7 +314,7 @@ return; end case 'cellstr' - value = strsplit(javavalue); + value = strsplit2(javavalue); case 'logical' if ~isempty(self.Domain) value = strsetmatch(cell(javavalue), self.Domain); @@ -449,7 +449,7 @@ end if ~isempty(self.Domain) if iscellstr(self.Domain) - s = [s ' ' strjoin(',', self.Domain)]; + s = [s ' ' strjoin2(',', self.Domain)]; elseif isnumeric(self.Domain) s = [s ' ' mat2str(self.Domain)]; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/helpdialog.m b/dependencies/PropertyGrid-2010-09-16-mod/helpdialog.m index 3372922e..ecd1b3de 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/helpdialog.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/helpdialog.m @@ -68,7 +68,7 @@ function helpdialog(obj) % help text rgb = get(fig, 'Color'); text = cellfun(@(line) helpdialog_html(line), text, 'UniformOutput', false); - html = ['' strjoin(sprintf('\n'), text) '']; + html = ['' strjoin2(sprintf('\n'), text) '']; jtext = javax.swing.JLabel(html); jcolor = java.awt.Color(rgb(1), rgb(2), rgb(3)); jtext.setBackground(jcolor); diff --git a/dependencies/PropertyGrid-2010-09-16-mod/nestedassign.m b/dependencies/PropertyGrid-2010-09-16-mod/nestedassign.m index cb9dbe68..015b7a53 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/nestedassign.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/nestedassign.m @@ -25,7 +25,7 @@ % Copyright 2010 Levente Hunyadi function obj = nestedassign(obj, name, value) if ~iscell(name) - nameparts = strsplit(name, '.'); + nameparts = strsplit2(name, '.'); else nameparts = name; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/nestedfetch.m b/dependencies/PropertyGrid-2010-09-16-mod/nestedfetch.m index 7e295be0..2a410123 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/nestedfetch.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/nestedfetch.m @@ -21,7 +21,7 @@ % Copyright 2010 Levente Hunyadi function value = nestedfetch(obj, name) if ~iscell(name) - nameparts = strsplit(name, '.'); + nameparts = strsplit2(name, '.'); else nameparts = name; end diff --git a/dependencies/PropertyGrid-2010-09-16-mod/strjoin.m b/dependencies/PropertyGrid-2010-09-16-mod/strjoin2.m similarity index 84% rename from dependencies/PropertyGrid-2010-09-16-mod/strjoin.m rename to dependencies/PropertyGrid-2010-09-16-mod/strjoin2.m index b10a7b38..f5ed5d08 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/strjoin.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/strjoin2.m @@ -6,15 +6,15 @@ % strings: % a cell array of strings to join % -% See also: strsplit, cell2mat +% See also: strsplit2, cell2mat % Copyright 2008-2009 Levente Hunyadi -function string = strjoin(adjoiner, strings) +function string = strjoin2(adjoiner, strings) validateattributes(adjoiner, {'char'}, {'vector'}); validateattributes(strings, {'cell'}, {'vector'}); assert(iscellstr(strings), ... - 'strjoin:ArgumentTypeMismatch', ... + 'strjoin2:ArgumentTypeMismatch', ... 'The elements to join should be stored in a cell vector of strings (character arrays).'); if isempty(strings) string = ''; diff --git a/dependencies/PropertyGrid-2010-09-16-mod/strsplit.m b/dependencies/PropertyGrid-2010-09-16-mod/strsplit2.m similarity index 84% rename from dependencies/PropertyGrid-2010-09-16-mod/strsplit.m rename to dependencies/PropertyGrid-2010-09-16-mod/strsplit2.m index 3267de71..61ec2df7 100644 --- a/dependencies/PropertyGrid-2010-09-16-mod/strsplit.m +++ b/dependencies/PropertyGrid-2010-09-16-mod/strsplit2.m @@ -6,10 +6,10 @@ % adjoiner: % string separating each neighboring element % -% See also: strjoin +% See also: strjoin2 % Copyright 2008-2009 Levente Hunyadi -function strings = strsplit(string, adjoiner) +function strings = strsplit2(string, adjoiner) if nargin < 2 adjoiner = sprintf('\n');