Mercurial > octave-nkf
comparison scripts/general/is_square.m @ 78:0fda6e1f90e0
[project @ 1993-08-30 15:40:16 by jwe]
author | jwe |
---|---|
date | Mon, 30 Aug 1993 15:40:48 +0000 |
parents | 98eb51c870b2 |
children | 16a24e76d6e0 |
comparison
equal
deleted
inserted
replaced
77:1cc0af4496c6 | 78:0fda6e1f90e0 |
---|---|
4 # | 4 # |
5 # If x is square, then return value is the dimension of x. | 5 # If x is square, then return value is the dimension of x. |
6 # otherwise, returns a value of 0 | 6 # otherwise, returns a value of 0 |
7 # | 7 # |
8 # See also: size, rows, columns, length, is_matrix, is_scalar, is_vector | 8 # See also: size, rows, columns, length, is_matrix, is_scalar, is_vector |
9 | |
10 # Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. | |
9 | 11 |
10 if (nargin == 1) | 12 if (nargin == 1) |
11 [nr, nc] = size (x); | 13 [nr, nc] = size (x); |
12 if (nr == nc) | 14 if (nr == nc) |
13 retval = nr; | 15 retval = nr; |