summaryrefslogtreecommitdiff
path: root/q_after_abcd.m
diff options
context:
space:
mode:
Diffstat (limited to 'q_after_abcd.m')
-rw-r--r--q_after_abcd.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/q_after_abcd.m b/q_after_abcd.m
new file mode 100644
index 0000000..fd1f905
--- /dev/null
+++ b/q_after_abcd.m
@@ -0,0 +1,6 @@
+function qnew=q_after_abcd(q_old,abcd)
+% calculates q parameter after propagating through element with given abcd matrix
+ qnew=(q_old*abcd(1,1)+abcd(1,2))/(q_old*abcd(2,1)+abcd(2,2));
+endfunction
+
+