I have this dataset which is of the form 

```
    14     2    -1
    18     2    -1
    63    58    -1
    69    58    -1
   125   126    -1
   127   126    -1
   128   126    -1
   129   126    -1
   143   131    -1
   188   184    -1

```

I want to define a matrix C which is MxM which consist of 1 in `C[u,u] = C[v,v] = 1` and `C[u,v] = C[v,u] = -1` for each entry `(u,v,-1)` in my dataset, how can I do this in matlab? the matrix C can be sparse because M is very large, it could be up to 1 million.