title: Transcendental equation solution by numerical method
body: <p>I want to solve one transcendental equation numerically. I have used the function 'solve' for the solution but my results are varied as compared to graphical solution. My code is written below and I am sending the graphical solution results.</p>
  
  <pre><code>clear all;
  n1=1.77;
  n2=1.45;
  d=1e-6;
  lambda = 1e-6;
  ko = 2*pi/lambda;
  A=(ko*n1)^2;
  B=(ko*n2)^2;
  r=(ko*d)*sqrt(n1^2-n2^2);
  syms h;
  s=((h*d)-m*pi) == 2*atan(sqrt(r^2/(h^2*d^2)-1));
  solve (s)
  prop=sqrt(A-ans^2);
  neff=(prop*lambda)/(2*3.14)
  </code></pre>
  
  <p>where m will be varries from 0 to 2.0 with interval of 0.5. Graphical results are: m=0 neff is 1.7299 but graphical solution is 1.75 m=0.5 neff is 1.678 but graphical solution is 1.71 m=1.0 neff is 1.608 but graphical solution is 1.65 m=1.5 neff is 1.523 but graphical solution is 1.55 m=2.0 neff is 1.451 but graphical solution is 1.452</p>
  
  <p>Can anyone please help me out and tell me the fault ? Also is there any other function can be used instead of 'solve'.</p>
  
  <p>Thanks.</p>