This is a static copy of a profile report

Home

Function details for RandStream.RandStream>RandStream.subsrefThis is a static copy of a profile report

Home

RandStream.RandStream>RandStream.subsref (Calls: 1, Time: 0.004 s)
Generated 19-Jun-2021 04:39:05 using performance time.
class method in file /nfs/linux/matlab-2019b/toolbox/matlab/randfun/@RandStream/RandStream.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
rng>getCurrentTypesubfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
593
if ~isvalid(a) || a.StreamID==...
10.003 s82.2%
623
varargout{1} = a.(s(1).subs);
10.000 s4.3%
597
case RandStream.VisibleMethods
10.000 s3.7%
587
switch s(1).type
10.000 s2.8%
608
if (length(s) > 1)
10.000 s1.2%
All other lines  0.000 s5.8%
Totals  0.004 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function44
Non-code lines (comments, blank lines)1
Code lines (lines that can run)43
Code lines that did run23
Code lines that did not run20
Coverage (did run/can run)53.49 %
Function listing
time 
Calls 
 line
 586 
        function [varargout] = subsref(a,s)
< 0.001 
      1 
 587
            switch s(1).type 
< 0.001 
      1 
 588
            case '()' 
 589 
                error(message('MATLAB:RandStream:subsref:SubscriptReferenceNotAllowed'))
< 0.001 
      1 
 590
            case '{}' 
 591 
                error(message('MATLAB:RandStream:subsref:CellReferenceNotAllowed'))
< 0.001 
      1 
 592
            case '.' 
  0.003 
      1 
 593
                if ~isvalid(a) || a.StreamID==0 
 594 
                    error(message('MATLAB:RandStream:InvalidHandle'));
< 0.001 
      1 
 595
                end 
< 0.001 
      1 
 596
                switch s(1).subs 
< 0.001 
      1 
 597
                case RandStream.VisibleMethods 
 598 
                    if isscalar(s)
 599 
                        args = {};
 600 
                    else
 601 
                        if length(s) > 2 || ~isequal(s(2).type, '()')
 602 
                            error(message('MATLAB:RandStream:subsref:InvalidMethodSyntax'));
 603 
                        end
 604 
                        args = s(2).subs;
 605 
                    end
 606 
                    [varargout{1:nargout}] = feval(s(1).subs,a,args{:});
< 0.001 
      1 
 607
                otherwise 
< 0.001 
      1 
 608
                    if (length(s) > 1) 
 609 
                        error(message('MATLAB:RandStream:subsref:InvalidPropertySyntax'));
< 0.001 
      1 
 610
                    end 
< 0.001 
      1 
 611
                    switch s(1).subs 
< 0.001 
      1 
 612
                    case 'State' 
 613 
                        varargout{1} = builtin('_RandStream_getset_mex','state',a.StreamID);
< 0.001 
      1 
 614
                    case 'Substream' 
 615 
                        varargout{1} = builtin('_RandStream_getset_mex','substream',a.StreamID);
< 0.001 
      1 
 616
                    case 'NormalTransform' 
 617 
                        varargout{1} = builtin('_RandStream_getset_mex','randnalg',a.StreamID);
< 0.001 
      1 
 618
                    case 'Antithetic' 
 619 
                        varargout{1} = builtin('_RandStream_getset_mex','antithetic',a.StreamID);
< 0.001 
      1 
 620
                    case 'FullPrecision' 
 621 
                        varargout{1} = builtin('_RandStream_getset_mex','fullprecision',a.StreamID);
< 0.001 
      1 
 622
                    case {'Type' 'Seed' 'NumStreams' 'StreamIndex'} 
< 0.001 
      1 
 623
                        varargout{1} = a.(s(1).subs); 
 624 
                    otherwise
 625 
                        error(message('MATLAB:RandStream:subsref:UnrecognizedProperty', s(1).subs));
< 0.001 
      1 
 626
                    end 
< 0.001 
      1 
 627
                end 
< 0.001 
      1 
 628
            end 
< 0.001 
      1 
 629
        end 

Other subfunctions in this file are not included in this listing.