changeset 20333:ababbe103048

gallery: allow N to be a 2 element vectors for cycol matrices.
author Carnë Draug <carandraug@octave.org>
date Fri, 03 Jul 2015 16:33:31 +0100
parents 26fc9bbb8762
children c5a8eff5a05d
files scripts/special-matrix/gallery.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/special-matrix/gallery.m	Fri Jul 03 16:20:56 2015 +0100
+++ b/scripts/special-matrix/gallery.m	Fri Jul 03 16:33:31 2015 +0100
@@ -911,7 +911,7 @@
   endif
 endfunction
 
-function A = cycol (n, k = max (round (n/4), 1))
+function A = cycol (n, k = max (round (n(end)/4), 1))
   ## CYCOL   Matrix whose columns repeat cyclically.
   ##   A = CYCOL([M N], K) is an M-by-N matrix of the form A = B(1:M,1:N)
   ##   where B = [C C C...] and C = RANDN(M, K).  Thus A's columns repeat