aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/AsciiQuickReference.txt
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-01-26 23:34:48 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-01-26 23:34:48 +0100
commit0f8d26c6a979f94ad64a3ffca81812e4bcb8bc8e (patch)
tree884eb8147d0aa20d2d880c83c8d66ad7ca912051 /doc/AsciiQuickReference.txt
parentcfa21f812339fce7531eb9f27f6d2c5287de661e (diff)
Doc: add flip* and arrayfun MatLab equivalent.
Diffstat (limited to 'doc/AsciiQuickReference.txt')
-rw-r--r--doc/AsciiQuickReference.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/AsciiQuickReference.txt b/doc/AsciiQuickReference.txt
index c604e575c..9599df60b 100644
--- a/doc/AsciiQuickReference.txt
+++ b/doc/AsciiQuickReference.txt
@@ -44,7 +44,7 @@ C.setRandom(rows,cols) // C = rand(rows,cols)*2-1
VectorXd::LinSpaced(size,low,high) // linspace(low,high,size)'
v.setLinSpaced(size,low,high) // v = linspace(low,high,size)'
VectorXi::LinSpaced(((hi-low)/step)+1, // low:step:hi
- low,low+step*(size-1))
+ low,low+step*(size-1)) //
// Matrix slicing and blocks. All expressions listed here are read/write.
@@ -94,6 +94,8 @@ R.transpose() // R.' or conj(R') // Read-write
R.diagonal() // diag(R) // Read-write
x.asDiagonal() // diag(x)
R.transpose().colwise().reverse() // rot90(R) // Read-write
+R.rowwise().reverse() // fliplr(R)
+R.colwise().reverse() // flipud(R)
R.replicate(i,j) // repmat(P,i,j)
@@ -139,6 +141,7 @@ R.cwiseAbs2() // abs(P.^2)
R.array().abs2() // abs(P.^2)
(R.array() < s).select(P,Q ); // (R < s ? P : Q)
R = (Q.array()==0).select(P,A) // R(Q==0) = P(Q==0)
+R = P.unaryExpr(ptr_fun(func)) // R = arrayfun(func, P) // with: scalar func(const scalar &x);
// Reductions.