I have a .DAT file generated by Fortran in which I have data for $2 \times 2$ matrices. For example, the file takes the form (when I open it in the excel):
I have added a snippet beacause the real variables are too long to type in TeX font. As you can see, each row contains 4 terms, corresponding to an entry in the matrix. Each bracket contains 2 terms because each entry is defined as a complex number; we have a complex matrix at hand.
Now there are about 1500 such entries in the file. Each entry correspond to a distinct time for which the matrix has been calculated. I want to do the following and I am not sure how to do the following steps:
For a specific time, say $t = 0$ (first entry), get the $2 \times 2$ matrix. Do some manipulations on them. The manipulations are of form: multiplying the matrix with 2 other matrices (twice) to get 2 scalar functions (one from each set of multiplication); taking the difference of the 2 scalar functions; and numerically optimizing the difference and get the optimized values of the inputs. I then want to repeat the analysis for all the other entries (matrices) in the file.
How does one go about doing such analysis in Mathematica? I'm clueless on this front. I know how to import one real matrix. I don't know how to import one complex matrix; and how to recursively import matrices from different rows and do the analysis on each matrix seperately.
If I know how to approach the problem, I can tackle it and then post additional questions with codes and related problems.
P.S: Please do suggest any other appropriate tag, if any.
Edit:
Using
Import["FILEPATH", "Table"]
here are the first few entries in the imported list:
{{( 0.70992637972979133 , 0.0000000000000000 ),
( 0.34768150998932623 ,-0.29148928933886220 ),
( 0.34768150998932623 , 0.29148928933886220 ),
( 0.29007362027020861 , 0.0000000000000000 )}, {0.71578138101774014 , 0.0000000000000000 ), (
0.34162400932308312 ,-0.29395228624439607 ), (
0.34162400932308312 , 0.29395228624439607 ), (
0.28421861898225981 , 0.0000000000000000 )}}
Fullform is:
List[List["( 0.70992637972979133 , 0.0000000000000000 )","( 0.347"\[Ellipsis] "0 )",""\[Ellipsis] "","( 0.29007362027020861 , 0.0000000000000000 )"],\[LeftSkeleton]1500\[RightSkeleton]]