I have an 8x8 matrix which contains some parameters with a certain range. I am trying to fit the eigenvalues of this matrix to my experimental data with the goal of
- having the best fit
- extracting the best value for the parameters of my matrix
The problem is that Mathematica does not give a well-defined function for the eigenvalues of an 8*8 matrix, so doing a fit is problematic.
In the code below, I tried to plot eigenvalues by choosing a value for parameters, extracting the data points of this plot, and then finding a function for these data points, and then fitting this function to my experimental data. It fits very well but the problem is that I do not extract my main parameters from this fitting.
Do you have any other ideas on how to solve this problem? I would appreciate your help.
This is the matrix:
ParaMatrix = {{Es, 0, Kz*P, 0, 0, -Sqrt[2]*(Kx + I*Ky)*P/2, 0,
Sqrt[2]*(Kx - I*Ky)*P/2}, {0, Ep + δ/3 - Δ/3,
Sqrt[2]*Δ/3, 0, Sqrt[2]*(Kx + I*Ky)*P/2, 0, 0,
0}, {Kz*P, Sqrt[2]*Δ/3, Ep - 2*δ/3, 0, 0, 0,
0, 0}, {0, 0, 0, Ep + δ/3 + Δ/3,
Sqrt[2]*(Kx - I*Ky)*P/2, 0, 0, 0}, {0, Sqrt[2]*(Kx - I*Ky)*P/2, 0,
Sqrt[2]*(Kx + I*Ky)*P/2, Es, 0, Kz*P,
0}, {-Sqrt[2]*(Kx - I*Ky)*P/2, 0, 0, 0, 0,
Ep + δ/3 - Δ/3, Sqrt[2]*Δ/3,
0}, {0, 0, 0, 0, Kz*P, Sqrt[2]*Δ/3,
Ep - 2*δ/3, 0}, {Sqrt[2]*(Kx + I*Ky)*P/2, 0, 0, 0, 0, 0, 0,
Ep + δ/3 + Δ/3}};
Extracting the points:
Points =
Cases[Cases[InputForm[Plotmodel], Line[___],
Infinity], {_?NumericQ, _?NumericQ}, Infinity]
separating a part of the answers:
plot3 =
ListPlot[Points, PlotRange -> {{-0.2, 0.2}, {-1.5, -0.68}},
Joined -> True]
VB3 = Cases[
Cases[InputForm[plot3], Line[___],
Infinity], {_?NumericQ, _?NumericQ}, Infinity]
extracting the formula:
Formula = FindFormula[VB3, y]
Fitting:
nmf = NonlinearModelFit[
data3, -0.7208213695068 -
a*1.7916543143698 Cos[b*y]^11.454237942784 Sin[
27.179143620615 y^2], {a, b, c}, y]
data3
? $\endgroup$