How to check for empty matrix, scalar and vector without builtin functions
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Millone
il 26 Apr 2015
Commentato: Star Strider
il 26 Apr 2015
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 Commenti
Risposta accettata
Star Strider
il 26 Apr 2015
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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!