definition of a vector
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hamza Harbi
am 25 Feb. 2023
Kommentiert: Torsten
am 25 Feb. 2023
why an array of size 1-by-1-by-N is not a vector?
a=randi([1 10],1,1,3);
isvector(a)
1 Kommentar
Akzeptierte Antwort
the cyclist
am 25 Feb. 2023
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!