This is a static copy of a profile report

Home

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

Home

RandStream.randn (Calls: 1, Time: 0.000 s)
Generated 22-Jul-2019 16:32:29 using performance time.
function in file C:\Program Files\MATLAB\R2019a\toolbox\matlab\randfun\@RandStream\randn.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
eigs>checkInputssubfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
R = builtin('_RandStream_randn...
10.000 s76.5%
25
if nargin < 2
10.000 s5.2%
31
n = convertStringsToChars(n);
10.000 s4.6%
36
end
10.000 s3.7%
27
elseif nargin < 3
10.000 s1.6%
All other lines  0.000 s8.4%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function36
Non-code lines (comments, blank lines)24
Code lines (lines that can run)12
Code lines that did run6
Code lines that did not run6
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
   1 
function R = randn(s, m, n, varargin)
   2 
%RANDN Pseudorandom numbers from a standard normal distribution.
   3 
%   R = RANDN(S,N) returns an N-by-N matrix containing pseudorandom values drawn
   4 
%   from the standard normal distribution.  RANDN draws those values from the
   5 
%   random stream S.  RANDN(S,M,N) or RANDN(S,[M,N]) returns an M-by-N matrix.
   6 
%   RANDN(S,M,N,P,...) or RANDN(S,[M,N,P,...]) returns an M-by-N-by-P-by-...
   7 
%   array.  RANDN(S) returns a scalar.  RANDN(S,SIZE(A)) returns an array the
   8 
%   same size as A.
   9 
%
  10 
%   Note: The size inputs M, N, P, ... should be nonnegative integers.
  11 
%   Negative integers are treated as 0.
  12 
%
  13 
%   R = RANDN(..., 'double') or R = RANDN(..., 'single') returns an array of
  14 
%   normal values of the specified class.
  15 
%
  16 
%   The sequence of numbers produced by RANDN is determined by the internal
  17 
%   state of the random stream S.  RANDN uses one or more uniform values from S
  18 
%   to generate each normal value.  Control S using its RESET method and its
  19 
%   properties.
  20 
%
  21 
%   See also RANDN, RANDSTREAM, RANDSTREAM/RAND, RANDSTREAM/RANDI.
  22 

  23 
%   Copyright 2008-2017 The MathWorks, Inc. 
  24 

< 0.001 
      1 
  25
if nargin < 2 
  26 
   R = builtin('_RandStream_randn',s);
< 0.001 
      1 
  27
elseif nargin < 3 
  28 
   m = convertStringsToChars(m);
  29 
   R = builtin('_RandStream_randn',s,m);
< 0.001 
      1 
  30
elseif nargin < 4 
< 0.001 
      1 
  31
   n = convertStringsToChars(n); 
< 0.001 
      1 
  32
   R = builtin('_RandStream_randn',s,m,n);    
  33 
else
  34 
   [varargin{1:end}] = convertStringsToChars(varargin{1:end});
  35 
   R = builtin('_RandStream_randn',s,m,n,varargin{1:end});
< 0.001 
      1 
  36
end