1function [I, J, X] = GB_spec_extractTuples (A, xclass) 2%GB_SPEC_EXTRACTTUPLES a MATLAB mimic of GrB_*_extractTuples 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7A = GB_spec_matrix (A) ; 8if (nargin < 2) 9 xclass = A.class ; 10end 11p = A.pattern ; 12[I J] = find (p) ; 13I = uint64 (I-1) ; 14J = uint64 (J-1) ; 15X = GB_mex_cast (A.matrix (p), xclass) ; 16 17I = I (:) ; 18J = J (:) ; 19X = X (:) ; 20 21 22