diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-27 15:39:13 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-27 15:39:13 -0400 |
commit | 21ad89349d9f799ff6dfb9828d915797dd964e07 (patch) | |
tree | 1216277a871cd8110632ffcf5d6d0d5fa5cc61b0 /optics2abcd.m | |
parent | 52597cba7c3e12336151e2023a41f2758edb866a (diff) | |
download | mode_match-21ad89349d9f799ff6dfb9828d915797dd964e07.tar.gz mode_match-21ad89349d9f799ff6dfb9828d915797dd964e07.zip |
added optics to abcd conversion
Diffstat (limited to 'optics2abcd.m')
-rw-r--r-- | optics2abcd.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/optics2abcd.m b/optics2abcd.m new file mode 100644 index 0000000..44077cf --- /dev/null +++ b/optics2abcd.m @@ -0,0 +1,17 @@ +function abcd = optics2abcd( optics ) +% converts optics ellements to full abcd matrix +% assuming that the last position along propagation coinsides +% with the last optical element + +optics = arrange_optics_along_x( optics ); + +abcd = [1,0; 0, 1]; + +d=0; +N=length(optics); +for i=1:N + d=optics{i}.x - d; % distance between optical elements + abcd= optics{i}.abcd * abcd_free_space(d) * abcd; +end + +end |