Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/machine_learning/ml_trainlda.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions dependencies/PropertyGrid-2010-09-16-mod/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dependencies/PropertyGrid-2010-09-16-mod/PropertyGrid.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions dependencies/PropertyGrid-2010-09-16-mod/PropertyType.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dependencies/PropertyGrid-2010-09-16-mod/helpdialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function helpdialog(obj)
% help text
rgb = get(fig, 'Color');
text = cellfun(@(line) helpdialog_html(line), text, 'UniformOutput', false);
html = ['<html>' strjoin(sprintf('\n'), text) '</html>'];
html = ['<html>' strjoin2(sprintf('\n'), text) '</html>'];
jtext = javax.swing.JLabel(html);
jcolor = java.awt.Color(rgb(1), rgb(2), rgb(3));
jtext.setBackground(jcolor);
Expand Down
2 changes: 1 addition & 1 deletion dependencies/PropertyGrid-2010-09-16-mod/nestedassign.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dependencies/PropertyGrid-2010-09-16-mod/nestedfetch.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down