Register to reply

Transfer Matrix Method - matlab

by Apasz
Tags: matlab, matrix, method, transfer
Share this thread:
Apasz
#1
Oct11-11, 08:38 PM
P: 4
Hi, I am working on evaluating electron transmissions through barriers using the transfer matrix method (like in optics) in matlab.

In the general simplest case, matching boundary conditions gives me two sets of equations:
Ax=By and Cy=Dz where A,B,C,D are 4x4 matrices and x,y,z are column vectors (4x1).

So by the transfer matrix method:
x=(A^-1)By and y=(C^-1)Dz so x={(A^-1)B(C^-1)D}z where the stuff inside the curly brackets is the transfer matrix (call it N).

Now at the moment, my code is N = inv(A)*B*inv(C)*D.

The issue is that for certain parameters, matlab returns that the matrix is nearly singular. It still calculates it and it seems to be fine most of the time (no goofy transmissions) but sometimes it just blows up. From what I have read, inverses isn't really something you do anyways in programming.

So my question is, how can I obtain my transfer matrix without taking inverses?

Matlab can solve equations of the form Ax=b, by the command x=A\b which I've read is far superior to taking inverses.The problem though is I have Ax=By and I don't want to multiply y into B.

In otherwords for the equations again: Ax=By and Cy=Dz, I would get x=A\(B*y) and y=C\(D*z) and so x=A\(B*C\(D*z)) but this is not a transfer matrix, this is a column vector since z has been multiplied into it. The whole point is to get the form x=Nz where x,z are the column vectors and N is the transfer matrix (4x4 in my case).

I am quite baffled by this whole thing, since I don't feel it should be difficult at all. Though my inexperience in computational physics is quite evident.

Any help would be MUCH appreciated.
Cheers!
Phys.Org News Partner Science news on Phys.org
Sapphire talk enlivens guesswork over iPhone 6
Geneticists offer clues to better rice, tomato crops
UConn makes 3-D copies of antique instrument parts

Register to reply

Related Discussions
Transfer function in matlab Math & Science Software 1
Ray transfer matrix method, I need explanations Introductory Physics Homework 1
Transfer Matrix Method of DFB laser Differential Equations 0
Heat Transfer: Finite Difference method using MATLAB Engineering, Comp Sci, & Technology Homework 0
Matlab Transfer Function! Math & Science Software 1