title: 4 eq for two variables in Matlab
body: <p>can you tell me please where i have to put my starting value in the below mentioned code suppose i want to solve it for initial value -2p  for both theta and phi</p>
  
  <pre><code>function myFcn    
  
      X = fsolve(@F, 2*pi*rand(2,1))
  
  end
  
  function val = F(X)
  
      th = X(1);
      ph = X(2);
  
      val =  [
          cos(2*th) + sin(2*th)
          cos(ph).^2.*cos(th).^2 + cos(ph).^2.*cos(2*th).*sin(2*th) + cos(ph).^2.*cos(2*th) + sin(2*ph).*cos(2*ph).*cos(2*th).*sin(2*th) + sin(2*ph).*cos(2*ph).*sin(th).^2 + sin(2*ph).*cos(2*ph).*sin(2*th) + 0.4837
          cos(2*ph).*cos(th).^2.*sin(2*ph) + cos(2*th).*sin(ph).^2.*sin(2*th) + cos(2*ph).*cos(2*th).*sin(2*ph).*sin(2*th) + cos(2*ph).*cos(2*th).*sin(2*ph) + sin(ph).^2.*sin(2*th) - 1
          cos(th).^2.*sin(2*ph) - cos(2*ph).*sin(th).^2 - cos(2*ph).*sin(2*th) + cos(2*th).*sin(2*ph) - cos(2*ph).*cos(2*th).*sin(2*th) + cos(2*th).*sin(2*ph).*sin(2*th)
  ];
  end
  </code></pre>
  
  <p>thankx</p>