/* Determine the category (class) of the input array_ptr, and then branch to the appropriate analysis routine. */ mxClassID analyze_class(const mxArray *array_ptr) { mxClassID category; category = mxGetClassID(array_ptr); switch (category) { case mxCHAR_CLASS: analyze_string(array_ptr); break; case mxSTRUCT_CLASS: analyze_structure(array_ptr); break; case mxSPARSE_CLASS: analyze_sparse(array_ptr); break; case mxCELL_CLASS: analyze_cell(array_ptr); break; case mxUNKNOWN_CLASS: mexWarnMsgTxt("Unknown class."); break; default: analyze_full(array_ptr); break; } return(category); }
/* Determine the category (class) of the input array_ptr, and then branch to the appropriate analysis routine. */ mxClassID analyze_class(const mxArray *array_ptr) { mxClassID category; category = mxGetClassID(array_ptr); if (mxIsSparse(array_ptr)) { analyze_sparse(array_ptr); } else { switch (category) { case mxLOGICAL_CLASS: analyze_logical(array_ptr); break; case mxCHAR_CLASS: analyze_string(array_ptr); break; case mxSTRUCT_CLASS: analyze_structure(array_ptr); break; case mxCELL_CLASS: analyze_cell(array_ptr); break; case mxUNKNOWN_CLASS: mexWarnMsgIdAndTxt("MATLAB:explore:unknownClass", "Unknown class."); break; default: analyze_full(array_ptr); break; } } return(category); }