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.