MATLAB Answers

0

if variable is a matrix then ignore

AA 님이 질문을 제출함. 18 Feb 2015
최근 활동 Erik S. 님이 편집함. 18 Feb 2015
hi guys, i get several variables. some of these variables are real numbers whilst others are matrices/vectors. I want the variables with matrices or vectors filtered our/deleted. how can i do that?

  댓글 수: 0

로그인 to comment.

답변 수: 1

Answer by Erik S.
on 18 Feb 2015
Edited by Erik S.
on 18 Feb 2015
 Accepted Answer

use the numel function to detect the number of elements in a variable.
elements = numel(variable)
if elements > 1
you have a vector or matrix

  댓글 수: 0

로그인 to comment.



Translated by