Hi,

I have a vector representing distances between cities.

I have an nxn matrix looking like :

I'm trying to get the distances loaded to the matrix but I only have distances in one direction so I need to transpose them to make a fully symmetrical matrix i.e

What's the easiest way to do this?

I have a vector representing distances between cities.

I have an nxn matrix looking like :

Code:

```
Manchester Leeds London
Manchester
Leeds
London
```

Code:

```
Manchester Leeds London
Manchester 0 20 200
Leeds 20 0 230
London 200 230 0
```

Last edited: