1function s = GB_spec_type (X) 2%GB_SPEC_TYPE determine the class of a MATLAB matrix 3% s = GB_spec_type (X) determines the class of X. It is identical to s = 4% class(X), except when X is a complex matrix. In this case the string 5% 'complex' is appended to the result of class (X). If X is a single and 6% iscomplex (X) is true, then s is 'single complex', and if X double, s is 7% 'double complex'. Complex integer matrices result in 'int8 complex' (for 8% example), although GraphBLAS does not currently handle those. 9% 10% For a MATLAB matrix X, GB_spec_type (X) and GrB.type (X) are identical. 11% 12% See also GrB.type. 13 14% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 15% SPDX-License-Identifier: Apache-2.0 16 17s = class (X) ; 18if (~isreal (X)) 19 s = [s ' complex'] ; 20end 21 22