D = degree( G ) returns the degree of each node in graph G . The degree is the number of edges connected to each node. D = degree( G , nodeIDs ) returns the degree of the nodes specified by nodeIDs .