# matrix problem: evaluation of column values which depend on a variable

I do not use Mathematica for a long time and I have a question about a matrix problem.

\[Omega] = 2 \[Pi]*f;
v = Sqrt[c/r];
c = Subscript[c,0] + I*\[Omega]*n1];
k1 = \[Omega]*Sqrt[r1/c];
k2 = \[Omega]*Sqrt[r2/m]];

y = ({{x1},{x2},{x3},{x4},{x5},{x6}});
amat = ({{e/[\[CurlyEpsilon]], e/[\[CurlyEpsilon]], 0, 0, 0, 1},
{e/[\[CurlyEpsilon]]*E^(I*k1*h1),e/[\[CurlyEpsilon]]*E^(-I*k1*h1), 0, 0, h1,1},{I*c*k1, -I*c*k1, 0, 0, e, 0},{I*c*k1*(E^(I*h1*k1)) , -I*c*k1*(E^(-I*h1*k1)), -I*k2*m*(E^(I*h1*k2)) , I*k2*m*(E^(-I*h1*k2)) , e, 0},
{E^(I*h1*k1), E^(-I*h1*k1), -E^(I* h1*k2), E^(-I* h1*k2), 0, 0},
{0, 0, E^(I*k2*(h1+h2)),-E^(-I*k2*(h1+h2)),0,0}});

bmat = ( {{\[CurlyPhi]},{-[\[CurlyPhi]},{0},{0},{0},{0}});

Solve[amat.y == bmat, {x1, x2, x3, x4, x5, x6}]


This is what I tried so far. So, for a specific value of frequency, I can take the results for column y (x1,x2,x3,x4,x5, and x6), but I want to get at the same time the results for a range of frequencies (f goes from fmin to fmax). What is the best way to do that?

P.S. When I'll get the list of the values for the y column, can I isolate the results of one of them (i.e, x2) and calculate something else with that?

• Pasting the code that you have tried out so far establishes a reference point for the respondents. I recommend that you include your code and explain where you got stuck to get effective responses.
– Syed
Oct 18 at 11:40
• How clumsy of me! I forgot to say "Welcome to the Mathematica Stack Exchange".
– Syed
Oct 18 at 11:50
• @Syed hello, Syed and thanks a lot. I edit my post and added the code. Oct 18 at 13:10
• Please use lowercase letters; I switched amat for A and bmat for B. Then: sol = Solve[amat . y == bmat, {x1, x2, x3, x4, x5, x6}]; gets these solutions into a list. In order to get individual items: e.g., x1 /. sol /. {f -> fmin, Subscript[h, q] -> 3} etc. Another note: avoid subscripts if possible.
– Syed
Oct 18 at 13:52
• y = {x1, x2, x3, x4, x5, x6} would work as it is considered a vector in Mma.
– Syed
Oct 18 at 14:04