What's the difference between vectors and arrays?
조회 수: 102 (최근 30일)
이전 댓글 표시
As per subject, what's the difference between vectors and arrays in Matlab?
댓글 수: 0
답변 (4개)
Stephen23
2017년 5월 31일
편집: Stephen23
2017년 5월 31일
Just the size.
All arrays, matrices, vectors, and scalars in MATLAB are actually ND-arrays with infinite trailing singleton dimensions. A matrix has dimension three and higher as singleton. A vector has one non-singleton dimension (in MATLAB this is restricted to the first or second dimension, as the isvector docs show). There are no different classes for these different size arrays, the size alone is what distinguishes them (just like in mathematics).
"Arrays in MATLAB are N-dimensional, with an infinite number of trailing singleton dimensions."
댓글 수: 0
Aloysius Fernandez
2021년 8월 31일
simply put - In MATLAB, all vectors are arrays, but not all arrays are vectors - they could be matrices or scalars.
댓글 수: 0
Steven Lord
2017년 5월 31일
MATLAB functions that expect a vector as input expect to be called with an array A as input for which isvector(A) returns true.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!