Hey everyone, here is a link which shows what formulas I have used, what parameters I have used, and the correct graph that I should be getting (the green line). Here is the direct linkhttp://imageshack.us/g/17/formulaj.jpg/
Here is my code also:
H = 6.63e-34;%Plancks constant [J.s]
Lambda = 1550; %wavelength of continuous wave laser (units: nm)
C = 3e5; %speed of light [nm/ps]
V = 3e8/1550e-9; %frequency of the propagating light [Hz]
Please note that the sub equations were from a text book and should be correct. I think my error occurs when I convert from dB to W. I get confused when converting units however I have looked over my conversions and seems to be correct.
The conversions I used were: dB/km- 1/km 0.2 dB/km- 4.343*0.2
The other conversion was from dBm to W On the parameter image, it states that dBm should be a matrix (Ptx-launch power). So I used the relationship: dBm- W -8:0.1:3- 10^(dBm/10)*1e^-3 (The 1e-3 was because the answer gives dBm- mW so I just converted to W).
now im sure ive messed up with the units but there could be other mistakes. To conclude, I am trying to plot the green graph exactly as shown in the attachment.