definition of a vector

11 次查看(过去 30 天)
why an array of size 1-by-1-by-N is not a vector?
a=randi([1 10],1,1,3);
isvector(a)
ans = logical
0

采纳的回答

the cyclist
the cyclist 2023-2-25
Because, according to the documentation for isvector, "A vector is a two-dimensional array that has a size of 1-by-N or N-by-1".
One can obviously make the argument that that is not a good definition of a vector. But the behavior is well documented.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by