'I need to convert a 3 column array into a square matrix?

I am looking to convert my data to a square matrix:

image



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source