What's the difference between vectors and arrays?
98 ビュー (過去 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!