blob: 86dbd993e4d3c1df60456d8c939c3ec66bce7135 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
function ret=isCavityStable (abcd_cavity)
% finds if a cavity is stable baced on its abcd matrix
% see eq.4 for stability condition
% doi:10.1088/1464-4258/7/1/002
% http://dx.doi.org/10.1088/1464-4258/7/1/002
A=abcd_cavity(1,1);
B=abcd_cavity(1,2);
C=abcd_cavity(2,1);
D=abcd_cavity(2,2);
u= (A+D+2)/4
if ( (0 < u) && (u < 1) )
ret = true;
else
ret = false;
end
end
|