Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.1K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problems evaluating & plotting a user-defined piecewise function

Posted 2 years ago

The attached worksheet attempts to calculate & plot the Fresnel reflection coefficients at the boundaries of a simple three-layer etalon cavity. The calculation & plotting at the first (external) boundary execute as expected, however, the calculation & plotting of the real & imaginary parts of the coefficients at the second (internal) cavity boundary do not return the expected values. The problem appears to be in the evaluation of the coefficient definitions, which I define in terms of a piecewise function to account for the phase changes when the AOI at the internal boundary equals or exceeds the critical angle, which I define previously. I feel like I might be missing something simple in my use of Mathematica syntax; any help is appreciated in advance. Scott

POSTED BY: Scott Milligan
4 Replies
Posted 2 years ago

Thank you, Gianluca,

I am tardy in my response, but your comments enabled me to track down my errors, which were indeed with my function expression, and not with my syntax. Everything is working as expected now.

Scott

POSTED BY: Scott Milligan

Your function Subscript[r, te][NDegtoRad[x]][[2]] is almost constant:

Subscript[r, te][NDegtoRad[x]][[2]]

You should review its definition.

POSTED BY: Gianluca Gorni
Posted 2 years ago
Attachment

Attachments:
POSTED BY: Scott Milligan

You can check the values this way:

{Subscript[r, te][NDegtoRad[x]][[2]], 
  Subscript[r, tm][NDegtoRad[x]][[2]], 
  Subscript[r, te][NDegtoRad[x]][[3]], 
  Subscript[r, tm][NDegtoRad[x]][[3]]} /. 
 Map[List, Thread[x -> \[Theta]]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard