I have a program which saves a matrix of size m x n as an array of length L (where L = m x n) in a file.
Example for m = n = 2: The file contains the following numbers (in case of only one matrix in the file):
1
2
3
4
which represents a 2 x 2 matrix:
1 2
3 4
The file contains many matrices. I want to be able to plot specific matrices of this file using the ::start_position::end_position command and converting the array of length L into an m x n matrix such that I can use the command matrix nonuniform.
How can I do that?