title: Given an nxn Adjacency matrix, how can one compute the number of triangles in the graph (Matlab)?
body: <p>I wrote a function that, given n, generates random nxn adjacency matrices. I was wondering if there is a way to count the number a triangles in the graph represented by the matrix.</p>