This is a static copy of a profile reportHome
linspace (320 calls, 0.021 sec)
Generated 18-Mar-2011 23:31:42 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/elmat/linspace.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
17 | if nargin == 2 | 320 | 0.010 s | 50.0% |  |
22 | y = [d1+(0:n-2)*(d2-d1)/(floor... | 320 | 0 s | 0% |  |
21 | n = double(n); | 320 | 0 s | 0% |  |
All other lines | | | 0.010 s | 50.0% |  |
Totals | | | 0.021 s | 100% | |
Children (called functions)
No childrenM-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 22 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 5 |
Code lines that did run | 3 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 60.00 % |
Function listing
time calls line
1 function y = linspace(d1, d2, n)
2 %LINSPACE Linearly spaced vector.
3 % LINSPACE(X1, X2) generates a row vector of 100 linearly
4 % equally spaced points between X1 and X2.
5 %
6 % LINSPACE(X1, X2, N) generates N points between X1 and X2.
7 % For N < 2, LINSPACE returns X2.
8 %
9 % Class support for inputs X1,X2:
10 % float: double, single
11 %
12 % See also LOGSPACE, :.
13
14 % Copyright 1984-2004 The MathWorks, Inc.
15 % $Revision: 5.12.4.1 $ $Date: 2004/07/05 17:01:20 $
16
0.01 320 17 if nargin == 2
18 n = 100;
19 end
20
320 21 n = double(n);
320 22 y = [d1+(0:n-2)*(d2-d1)/(floor(n)-1) d2];