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?

 채택된 답변

Erik S.
Erik S. 2015년 2월 18일
편집: Erik S. 2015년 2월 18일

1 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

질문:

AA
2015년 2월 18일

편집:

2015년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by