1function C = real (G)
2%REAL complex real part.
3% C = real (G) returns the real part of G.
4%
5% See also GrB/conj, GrB/imag.
6
7% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
8% SPDX-License-Identifier: GPL-3.0-or-later
9
10Q = G.opaque ;
11
12if (contains (gbtype (Q), 'complex'))
13    C = GrB (gbapply ('creal', Q)) ;
14else
15    % G is already real
16    C = G ;
17end
18
19