1function C = cos (G)
2%COS cosine.
3% C = cos (G) is the cosine of each entry of G.
4% Since cos (0) = 1, the result is a full matrix.
5%
6% See also GrB/acos, GrB/cosh, GrB/acosh.
7
8% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
9% SPDX-License-Identifier: GPL-3.0-or-later
10
11G = G.opaque ;
12type = gbtype (G) ;
13if (~gb_isfloat (type))
14    type = 'double' ;
15end
16
17C = GrB (gbapply ('cos', gbfull (G, type))) ;
18
19