@@ -5050,111 +5050,6 @@ function displayScalarObject(obj,displayType)
50505050 disp(footer );
50515051 end
50525052
5053- % Overload for matlab.mixin.CustomDisplay.getPropertyGroups
5054- function groups = getPropertyGroups(obj ,displayType )
5055- % GETPROPERTYGROUPS Overload for returning properties to display
5056- %
5057- % Overload of matlab.mixin.CustomDisplay.getPropertyGroups to
5058- % change default output in Command Window for a scalar nigelObj
5059-
5060- if nargin < 2
5061- displayType = ' default' ;
5062- end
5063-
5064- switch lower(displayType )
5065- case {' default' ,' nonscalar' }
5066- groups = getPropertyGroups@matlab.mixin.CustomDisplay(obj );
5067- case ' scalar'
5068- status_out = obj .getDescriptiveStatus();
5069- pars_out = obj .getDescriptivePars();
5070- switch obj .Type
5071- case ' Block'
5072- data_out = struct(...
5073- ' Name' ,obj .Name ,...
5074- ' Duration' ,obj .Duration ,...
5075- ' NumChannels' ,obj .NumChannels ,...
5076- ' NumProbes' ,obj .NumProbes ,...
5077- ' SampleRate' ,obj .SampleRate ,...
5078- ' RecSystem' ,obj .RecSystem .Name ,...
5079- ' User' ,obj .User );
5080-
5081- groups = [...
5082- matlab .mixin .util .PropertyGroup(data_out ,...
5083- ' <strong>Data</strong>' )...
5084- matlab .mixin .util .PropertyGroup(obj .Meta ,...
5085- ' <strong>Meta</strong>' )...
5086- matlab .mixin .util .PropertyGroup(pars_out ,...
5087- ' <strong>Parameters</strong>' )...
5088- matlab .mixin .util .PropertyGroup(status_out ,...
5089- ' <strong>Status</strong>' )...
5090- ];
5091- case ' Animal'
5092- data_out = struct ;
5093- for i = 1 : numel(obj .Children )
5094- % Get rid of any "weird" characters
5095- name = strrep(obj .Children(i ).Name,' -' ,' _' );
5096- name = strrep(name ,' ' ,' _' );
5097- name = strrep(name ,' +' ,' _' );
5098- name = strrep(name ,' &' ,' _' );
5099- name = strrep(name ,' |' ,' _' );
5100- if ~regexpi(name ,' [a-z]' )
5101- name = [' Block_' name ];
5102- end
5103- str_view = ...
5104- [' <a href="matlab: ' ...
5105- ' nigeLab.sounds.play('' pop'' ,1.5);' ...
5106- ' nigeLab.nigelObj.DisplayCurrent(tankObj.' ...
5107- sprintf([' Children(%g ).Children(%g ),' ...
5108- ' '' simple'' );"' ], obj .Index ,i ) ' >View</a>' ];
5109-
5110- data_out.(name ) = str_view ;
5111- end
5112- groups = [...
5113- matlab .mixin .util .PropertyGroup(data_out ,...
5114- ' <strong>Data</strong>' )...
5115- matlab .mixin .util .PropertyGroup(obj .Meta ,...
5116- ' <strong>Meta</strong>' )...
5117- matlab .mixin .util .PropertyGroup(pars_out ,...
5118- ' <strong>Parameters</strong>' )...
5119- matlab .mixin .util .PropertyGroup(status_out ,...
5120- ' <strong>Status</strong>' )
5121- ];
5122- case ' Tank'
5123- data_out = struct ;
5124- for i = 1 : numel(obj .Children )
5125- name = strrep(obj .Children(i ).Name,' -' ,' _' );
5126- name = strrep(name ,' ' ,' _' );
5127- if ~regexpi(name ,' [a-z]' )
5128- name = [' Animal_' name ];
5129- end
5130- str_view = ...
5131- [' <a href="matlab: ' ...
5132- ' nigeLab.sounds.play('' pop'' ,1.5);' ...
5133- ' nigeLab.nigelObj.DisplayCurrent(tankObj.' ...
5134- sprintf(' Children(%g ),'' simple'' );"' ,i ) ...
5135- ' >View</a>' ];
5136- data_out.(name ) = str_view ;
5137- end
5138- groups = [...
5139- matlab .mixin .util .PropertyGroup(data_out ,...
5140- ' <strong>Data</strong>' )...
5141- matlab .mixin .util .PropertyGroup(obj .Meta ,...
5142- ' <strong>Meta</strong>' )...
5143- matlab .mixin .util .PropertyGroup(pars_out ,...
5144- ' <strong>Parameters</strong>' )...
5145- matlab .mixin .util .PropertyGroup(status_out ,...
5146- ' <strong>Status</strong>' )
5147- ];
5148- otherwise
5149- groups = getPropertyGroups@matlab.mixin.CustomDisplay(obj );
5150- end
5151-
5152- otherwise
5153- error([' nigeLab:' mfilename ' :BadType' ],...
5154- ' Unexpected case: %s ' ,displayType );
5155- end
5156- end
5157-
51585053 % Return `Substruct` array indices to "Methods" subscripts
51595054 function [methodSubs ,methodName ,methodOutputs ,methodInputs ] = findMethodSubsIndices(obj ,S )
51605055 % FINDMETHODSUBSINDICES Return array indices to methods subscripts
@@ -5447,8 +5342,12 @@ function displayScalarObject(obj,displayType)
54475342 case ' Animal'
54485343 data_out = struct ;
54495344 for i = 1 : numel(obj .Children )
5345+ % Get rid of any "weird" characters
54505346 name = strrep(obj .Children(i ).Name,' -' ,' _' );
54515347 name = strrep(name ,' ' ,' _' );
5348+ name = strrep(name ,' +' ,' _' );
5349+ name = strrep(name ,' &' ,' _' );
5350+ name = strrep(name ,' |' ,' _' );
54525351 if ~regexpi(name ,' [a-z]' )
54535352 name = [' Block_' name ];
54545353 end
0 commit comments