Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.65 KB File ID: #29486

ismatrix1

by Carey Smith

 

22 Nov 2010

Work-around for error in built-in function ismatrix (2010b). Only returns 1 for matrices

| Watch this File

File Information
Description

Built-in function ismatrix() (2010b) returns 1 for scalars, vectors, strings, and empty variables, as well as for matrices.

ismatrix1() corrects it to return 1 only for matrices.
It returns 0 for for scalars, vectors, strings, and empty variables.

ismatrix1_test gives examples of using ismatrix and ismatrix1() on scalars, vectors, strings, and matrices.

MATLAB release MATLAB 7.11 (2010b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
24 Nov 2010 Cris Luengo

ismatrix does what the documentation says it does. It seems to not do what you want it to do. I don't see how that's an error.
"ismatrix(V) returns logical 1 (true) if size(V) returns [m n] with nonnegative integer values m and n, and logical 0 (false) otherwise."

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mathematics Carey Smith 23 Nov 2010 10:35:14
data type Carey Smith 23 Nov 2010 10:35:14

Contact us at files@mathworks.com