Dear all,
I've been trying to read a matrix from a (very confusing) file, as shown below.
I am using MATLAB R2017a and the textread function with '%f%f%f%f' to read the "$Nodes" to "$EndNodes" numbers, but I had no success. What is the correct mask format to read this file as I need? More precisely, I need to extract the matrix from [1 0 0 0] to [12 0.3939339828220179 0.6060660171779821 0] in this example.
$MeshFormat2.2 0 8$EndMeshFormat$Nodes241 0 0 02 1 0 03 1 1 04 0 1 05 0.35 0.5 06 0.65 0.5 07 0.5 0.35 08 0.5 0.65 09 0.3939339828220177 0.393933982822018 010 0.6060660171779819 0.3939339828220176 011 0.6060660171779821 0.6060660171779821 012 0.3939339828220179 0.6060660171779821 0$EndNodes$Elements461 1 2 3 1 1 22 1 2 4 2 2 33 1 2 5 3 3 44 1 2 4 4 4 15 2 2 1 1 6 20 176 2 2 1 1 7 15 137 2 2 1 1 9 14 15$EndElements
Best Answer