Cosmetic change.
parent
ee2ad1ee15
commit
798aaaa968
|
@ -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
|
Loading…
Reference in New Issue