<< i | Constructors functions | pi >> |
R = ones |
R = ones(n) |
R = ones(n, m) |
R = ones(n, m, ..., z) |
R = ones(n, m, ..., z, 'like', V) |
R = ones(n, m, ..., z, classname) |
a variable: n-by-n matrix
a variable: n-by-m matrix
ones returns a matrix made of ones.
ones(3,2)
ones(3,1,3,'single')
A = single([3 3])
B = ones(2,4,'like', A)
tic(); single(1) * ones(1000); toc()
tic();ones(1000,'single'); toc()
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET