I'm very new to Mathematica and to programming. Complete computer novice. I might be coming at my problem from too mathematical a viewpoint
Basically what I'm trying to do is find the transmission of a generic wave through a series of potential barriers with spin orbit interaction and a magnetic field. Now, I can do all the maths, but at a certain point you have to compute these hideous 4x4 matrices so I hoped mathematica could do that part for me and give me graphs.
I want to keep the functions as general as possible until right at the end so I can input parameters right at the graphing stage. But the evaluation gets so big that graphs take hours to plot even over small ranges. Also, the calculation is complicated enough that even if I define 5 out of 6 variables and only keep the variable I want to us as x axis, the evaluation uses up all of my memory and quits before it even finishes.
I don't understand parallelization - and the little bit of experimenting I've done returns <<cannot be parallelized>> messages.
The crucial line is
Anz[n_, a_, d_, kx_, l_, g_] =
Inverse[L[((n - 1)/2) (a + d), kx]].Smz[a, d, kx, l,
g].(MatrixPower[Sz[a, d, kx, l, g], (n - 3)/2]).L[a, kx]
Where L, Smz and Sz are all 4x4 matrices with huge elements. Like so huge I cannot post even one here.
Please help, My computation as is isn't even as complicated as it need to be and it takes hours to plot a single graph!