Cosmetic change.

time-shift
Stéphane Adjemian (Charybdis) 2018-10-04 23:17:49 +02:00 committed by Sébastien Villemot
parent 8eb3023069
commit 6a87779d9e
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 11 additions and 25 deletions

View File

@ -1,28 +1,14 @@
function info = isquare(A)
%@info:
%! @deftypefn {Function File} {@var{info} =} isquare (@var{A})
%! @anchor{isquare}
%! @sp 1
%! Tests if @var{A} is square matrix.
%! @sp 2
%! @strong{Inputs}
%! @sp 1
%! @table @ @var
%! @item A
%! Matlab's array.
%! @end table
%! @sp 2
%! @strong{Outputs}
%! @sp 1
%! @table @ @var
%! @item info
%! Integer scalar equal to 1 if @var{A} is a square matrix, 0 otherwise.
%! @end table
%! @end deftypefn
%@eod:
% Returns true iff A is a square matrix.
%
% INPUTS
% - A [double] matrix.
%
% OUTPUTS
% - info [logical]
% Copyright (C) 2013-2014 Dynare Team
% Copyright (C) 2013-2018 Dynare Team
%
% This file is part of Dynare.
%
@ -39,7 +25,7 @@ function info = isquare(A)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
info = 0;
if isequal(ndims(A),2) && isequal(size(A,1),size(A,2))
info = 1;
info = false;
if ismatrix(A) && isequal(size(A, 1), size(A, 2))
info = true;
end