I wanted to plot the function:
TheoreticalT[n2_, k2_, w_] := (2*cn2[n2, k2]*(n1 + n3)*E^i(2*Pi*w*d2 (cn2[n2, k2] - 1))/c))/
((n1 + cn2[n2, k2])*(n3 + cn2[n2, k2]) - (cn2[n2, k2] - n1)*(cn2[n2, k2] - n3)*
e^(i(2*cn2[n2, k2]*2*Pi*w*d2)/c));
with n2 and k2 defined from:
cn2[n2_, k2_] := n2 - ik2;
and all the other variables being constants (n1, n3, d2, c):
n1 = 1 + i0; (*complex index of refraction of air*)
n3 = 1.7862 + I 0; (*complex index of refraction of substrate*)
d2 = 2.9477*10^-5; (*thickness of the sample(mm)*)
c = 0.29979;(*speed of light:mm/ps*)
I have tried doing a simple plot of just the n2 variable:
Plot[TheoreticalT[n2_, w_], {w, 0, 3}, Evaluated -> True]
But I'm not seeing any plot: [![enter image description here][1]][1]
Any suggestions on how to proceed? Thank you [1]: https://i.sstatic.net/m9wXI.png
Sqrt[-1]
isI
and noti
Any letter followed by letters or numbers is a variable. But3y
is3*y
because it does not start with a letter. It does not understand you may think i0 is the square root of -1 and then multiplied by zero. For inputE
is Euler's constant and note
When a plot will not appear think "complex numbers? or undefined variables?" TryingTable
instead can sometimes show you what is the problem, but you must have the right step size to see the problem. I hope this helped.. $\endgroup$