How to check for empty matrix, scalar and vector without builtin functions
1 次查看(过去 30 天)
显示 更早的评论
I am lost on this. How do I check for empty matrix, scalar or vector without using these builtin functions: isempty, isscalar, and is vector?
Some help will be appreciated.
Thanks
0 个评论
采纳的回答
Star Strider
2015-4-26
Using the size function is an option:
x = []
sx = size(x)
produces:
x =
[]
sx =
0.0000e+000 0.0000e+000
Since this seems to be a homework assignment, I leave the rest to you.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!