diff options
| author | Joel Martin <github@martintribe.org> | 2015-02-09 00:23:10 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-02-09 00:23:10 -0600 |
| commit | 7f567f36457b937c36345becdb7c1101566dcdf3 (patch) | |
| tree | 6481177a8a297475b3b361503e66315e5698b11d /matlab/core.m | |
| parent | b550d8b72a16aa83de1de9e76ac66ab000a0ef2f (diff) | |
| download | mal-7f567f36457b937c36345becdb7c1101566dcdf3.tar.gz mal-7f567f36457b937c36345becdb7c1101566dcdf3.zip | |
matlab: stepA, perf test, comments.
Diffstat (limited to 'matlab/core.m')
| -rw-r--r-- | matlab/core.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/matlab/core.m b/matlab/core.m index 578ec4d..ee86ad9 100644 --- a/matlab/core.m +++ b/matlab/core.m @@ -28,6 +28,11 @@ classdef core ret = types.nil; end + function ret = time_ms() + secs = now-repmat(datenum('1970-1-1 00:00:00'),size(now)); + ret = floor(secs.*repmat(24*3600.0*1000,size(now))); + end + function ret = concat(varargin) if nargin == 0 ret = {}; @@ -96,6 +101,7 @@ classdef core n('-') = @(a,b) a-b; n('*') = @(a,b) a*b; n('/') = @(a,b) floor(a/b); + n('time-ms') = @core.time_ms; n('list') = @(varargin) varargin; n('list?') = @iscell; |
