I am trying to obtain matrices with symbolic variables from .txt files. This is an example of a text file.
-1,x,0,x,0,0,0,x,0,x,0,x,0,x,0,x
0,x-1,0,0,0,0,0,x,0,0,0,x,0,0,0,x
0,0,x-1,0,0,0,0,0,x,0,0,x,0,0,0,x
0,0,0,x-1,0,0,0,x,0,0,0,0,0,x,0,x
0,0,0,0,x-1,0,0,x,0,0,0,0,0,0,x,x
0,0,0,0,0,x-1,0,0,x,0,0,0,0,x,0,x
0,0,0,0,0,0,x-1,0,x,0,0,0,0,0,x,x
0,x,0,0,x,0,0,x-1,0,0,0,x,0,0,x,x
0,0,x,0,0,0,x,0,x-1,0,0,x,0,0,x,x
0,0,0,0,0,0,0,0,0,x-1,0,x,0,x,0,x
0,0,0,0,0,0,0,0,0,0,x-1,x,0,0,x,x
0,0,0,0,0,0,0,0,0,0,0,x-1,0,0,0,x
0,0,x,0,0,0,0,0,x,0,x,0,x-1,0,x,x
0,0,0,0,0,x,0,0,x,x,0,x,0,x-1,0,x
0,0,0,0,0,0,x,0,x,0,x,x,0,0,x-1,x
0,0,x,0,0,0,x,0,x,0,x,0,x,0,x,x-1
When I try with readmatrix, the values with an 'x' get replaced with NaN
When I try with importdata, I get a cell where each value is a string containing a row of the matrix.
Another thing I tried is to copy the matrix in Matlab but when I do with bigger matrices (625x625 for example) Matlab starts lagging a lot.
I would appreciate if anyone has any ideas