I seem to be getting some arbitrary values from my Scilab code for a function. I have to generate a graph showing the dependence of the transmission on the air gap separating two higher refractive index materials i.e. I want to plot "T" as a function of "d".(adsbygoogle = window.adsbygoogle || []).push({});

[tex] T = \frac{1}{1 + \beta \sinh^2 (\delta)}[/tex]

δ = 2∏d/λ

The output graph does not match with what I was expecting. The transmission T should start at 1 and decrease with increasing d. Instead the graph seems reversed. I have attached the output graph file. I plotted the graph with the same formula in excel and it turns out right. Can someone take a look at my code and point out where I am going wrong.Code (Text):d = [0:0.01:1]

delta = 2*%pi*d

T = 1/(1+0.36*(sinh(delta))^2)

plot(d,T)

xtitle("Transmission dependence on d","d","T")

Thanks in advance.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help with scilab code for calculating transmission coefficient

Loading...

Similar Threads - Help scilab code | Date |
---|---|

C/++/# Help with MATLAB code? | Feb 9, 2018 |

What's wrong with my bisection method code? | Dec 10, 2017 |

Help: Convert Matlab to Python code | Dec 8, 2017 |

Scilab data loading | Sep 22, 2008 |

**Physics Forums - The Fusion of Science and Community**