Borrar filtros
Borrar filtros

Any one give me an example for false output in ismatrix.

2 visualizaciones (últimos 30 días)
Stalin Samuel
Stalin Samuel el 19 de Jul. de 2016
Comentada: Stalin Samuel el 19 de Jul. de 2016
I wondering if anyone point out a input which gives false output for ismatrix

Respuesta aceptada

Matt J
Matt J el 19 de Jul. de 2016
Editada: Matt J el 19 de Jul. de 2016
>> ismatrix(rand(3,3,3))
ans =
0
As more exotic example,
>> ismatrix(myclass)
ans =
0
where myclass is defined as follow,
classdef myclass
methods
function sz=size(obj)
sz=1;
end
end
end
  4 comentarios
Matt J
Matt J el 19 de Jul. de 2016
From the help doc for ismatrix
ismatrix(M) returns logical 1 (true) if SIZE(M) returns [m n]
with nonnegative integer values m and n, and logical 0 (false) otherwise.

Iniciar sesión para comentar.

Más respuestas (1)

the cyclist
the cyclist el 19 de Jul. de 2016
M = zeros(2,3,5)
ismatrix(M)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by