the names say it all... really
no need to ponder
isrow(v) returns true if v is a row-vector and false otherwise
iscol(v) returns true if v is a column-vector and false otherwise
this is a highly optimized software package
us (2021). isrow iscol: pedestrian siblings who determine the nature of an array (https://www.mathworks.com/matlabcentral/fileexchange/9861-isrow-iscol-pedestrian-siblings-who-determine-the-nature-of-an-array), MATLAB Central File Exchange. Retrieved .
Simple and effective
sorry, I forgte the rating!
One line of code can do this! The same line I would use calling this tool!! By the way you are better doing "pedestrian stuff" ;) sick
FYI: Simple submissions like this often make good subfunctions that you just add to the end of a primary function that calls them.
I'll admit these functions seem so incredibly trivial that part of me wants to ask why post it? But it is a fact that many of my codes have tests in them that are equivalent to one of these tools. It is the use of simple, well-named idioms like this that makes for the best self documenting code. These functions are a logical continuation of the family of functions isvector, isscalar, etc. Good complete help. No error checking, but then what errors would you check for?
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!