Mercurial > octave-nkf
comparison src/DLD-FUNCTIONS/kron.cc @ 14501:60e5cf354d80
Update %!tests in DLD-FUNCTIONS/ directory with Octave coding conventions.
* __contourc__.cc, __delaunayn__.cc, __dispatch__.cc, __dsearchn__.cc,
__fltk_uigetfile__.cc, __glpk__.cc, __lin_interpn__.cc, __magick_read__.cc,
__pchip_deriv__.cc, __qp__.cc, __voronoi__.cc, besselj.cc, betainc.cc,
bsxfun.cc, cellfun.cc, chol.cc, conv2.cc, convhulln.cc, dassl.cc, det.cc,
dlmread.cc, dmperm.cc, dot.cc, eig.cc, eigs.cc, fft.cc, fft2.cc, filter.cc,
find.cc, gammainc.cc, gcd.cc, givens.cc, hess.cc, hex2num.cc, inv.cc, kron.cc,
lookup.cc, lsode.cc, lu.cc, luinc.cc, matrix_type.cc, max.cc, mgorth.cc,
nproc.cc, qr.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, rcond.cc, regexp.cc,
schur.cc, spparms.cc, sqrtm.cc, str2double.cc, strfind.cc, sub2ind.cc, svd.cc,
syl.cc, time.cc, tril.cc, tsearch.cc: Update %!tests in DLD-FUNCTIONS/
directory with Octave coding conventions.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 27 Mar 2012 22:46:45 -0700 |
parents | 97883071e8e4 |
children | 69eec23c8b3d |
comparison
equal
deleted
inserted
replaced
14498:36cfbd23fe9f | 14501:60e5cf354d80 |
---|---|
287 return retval; | 287 return retval; |
288 } | 288 } |
289 | 289 |
290 | 290 |
291 /* | 291 /* |
292 | |
293 %!test | 292 %!test |
294 %! x = ones(2); | 293 %! x = ones (2); |
295 %! assert( kron (x, x), ones (4)); | 294 %! assert (kron (x, x), ones (4)); |
296 | 295 |
297 %!shared x, y, z | 296 %!shared x, y, z |
298 %! x = [1, 2]; | 297 %! x = [1, 2]; |
299 %! y = [-1, -2]; | 298 %! y = [-1, -2]; |
300 %! z = [1, 2, 3, 4; 1, 2, 3, 4; 1, 2, 3, 4]; | 299 %! z = [1, 2, 3, 4; 1, 2, 3, 4; 1, 2, 3, 4]; |
301 %!assert (kron (1:4, ones (3, 1)), z) | 300 %!assert (kron (1:4, ones (3, 1)), z) |
302 %!assert (kron (x, y, z), kron (kron (x, y), z)) | 301 %!assert (kron (x, y, z), kron (kron (x, y), z)) |
303 %!assert (kron (x, y, z), kron (x, kron (y, z))) | 302 %!assert (kron (x, y, z), kron (x, kron (y, z))) |
304 | |
305 */ | 303 */ |