I want to represent a graph in MATLAB using information stored in a .mat file. The .mat file is an NxN square matrix. The goal is to be able to gather information on the graph (number of nodes, average degree, connected components, etc) using the matrix that represents edges between nodes.
I know Graph::createGraphFromMatrix exists but it is not supported in MATLAB.
I have tried variants of
G = graph(double('sparse.mat'));
D = degree(G);
But then I get errors like
Undefined function 'graph' for input arguments of type 'double'.
for whatever type I try. Does anyone know how to do this?