0
$\begingroup$

Whenever I run this code, it does not seem to be evaluating anything past the Evecs. There are other definitions/parameters involved in running the code. I am just not sure why it keeps saying "first argument in {} does not contain a list of data and coordinates". How can I fix this so that all of my values/functions are evaluated?

   HRedExpanded = ({
        {Δe1[t], Ωe1[t], Ωe2[t]},
        {Ωe1[t], Δe2[t], Ωe3[t]},
        {Ωe2[t], Ωe3[t], Δe3[t]}
       });

    notpoints = 1000;
        deltat = (tmax - tmin)/notpoints;
        t = tmin;
        Evecs = Eigenvectors[HRedExpanded];
        E1 = Evecs[[1]];
        E2 = Evecs[[2]];
        E3 = Evecs[[3]];
        λ1prev = E1/Sqrt[E1.E1];
        λ2prev = ComplexExpand[Orthogonalize[{E1, E2}][[2]]];
        λ3prev = E3/Sqrt[E3.E3];
        For[n = 1, n <= 3, n = n + 1,
          For[np = n + 1, np <= 3, np = np + 1,
            Hcdlist[n, np] = {};
            ];
          ];
        For[t = tmin + deltat, t <= tmax, t = t + deltat,
          Evecs = Eigenvectors[HRedExpanded];
          E1 = Evecs[[1]];
          E2 = Evecs[[2]];
          E3 = Evecs[[3]];
          λ1 = E1/Sqrt[E1.E1];
          λ2 = ComplexExpand[Orthogonalize[{E1, E2}][[2]]];
          λ3 = E3/Sqrt[E3.E3];
          dλ1 = (λ1 - λ1prev)/deltat;
          dλ2 = (λ2 - λ2prev)/deltat;
          dλ3 = (λ3 - λ3prev)/deltat;
          Matλ1 = 
           Outer[Times, dλ1, λ1] - (λ1.dλ1)*
             Outer[Times, λ1, λ1];
          Matλ2 = 
           Outer[Times, dλ2, λ2] - (λ2.dλ2)*
             Outer[Times, λ2, λ2];
          Matλ3 = 
           Outer[Times, dλ3, λ3] - (λ3.dλ3)*
             Outer[Times, λ3, λ3];
          Hcd = I*(Matλ1 + Matλ2 + Matλ3);
          For[n = 1, n <= 3, n = n + 1,
           For[np = n + 1, np <= 3, np = np + 1,
             Hcdlist[n, np] = Append[Hcdlist[n, np], {t, Im[Hcd[[n, np]]]}];
             ];
           ];
          λ1prev = λ1;
          λ2prev = λ2;
          λ3prev = λ3;
          ];
        For[n = 1, n <= 3, n = n + 1,
          For[np = n + 1, np <= 3, np = np + 1,
            Hcdint[n, np] = Interpolation[Hcdlist[n, np]];
            ];
          ];
        Plot[{Ωa[t], Ωb[t], Ωc[
           t]}, {t, tmin + deltat, tmax}, PlotStyle -> {Blue, Red, Green}, 
         PlotRange -> All, FrameLabel -> {"t", "|omega"}]
        Plot[{Abs[Ωatilde[t]], Abs[Ωbtilde[t]], 
          Abs[Ωctilde[t]]}, {t, tmin + deltat, tmax}, 
         PlotStyle -> {Blue, Red, Green}, PlotRange -> All, 
         FrameLabel -> {"t", "|omega"}]
        Clear[t];
        Hcdmatrix = 
          Table[(1 - KroneckerDelta[n, np])*If[np > n, -I, I]*
            Hcdint[Min[n, np], Max[n, np]][t], {n, 1, 3}, {np, 1, 3}];
        Htotal = HRedExpanded + Hcdmatrix;
$\endgroup$
  • 3
    $\begingroup$ Do you really try to compute Eigenvectors symbolically or are there actual definitions for Δe1, Ωe1, etc.? Also, please provide a minimal example. Often that is already enough to where the problems is and how to solve it. $\endgroup$ – Henrik Schumacher Jan 30 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.