title: Solve equations with symbolic input MatLab
body: <p>I am trying to solve a coupled equation.
  I have function V depending on changing variable tk(n) and function UP. This is my input for the solving the equation for the UP.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>OMG=zeros(kPoints,1);
  for nn1=1:kPoints
      OMG(nn1)=sqrt(tk(nn1))*(tanh((-sqrt(betaV)*betaU*sqrt(tk(nn1))+sqrt(betaV)*sqrt(tk(nn1)*tk(nn1*tk(nn1)))./CHI*CHI))./sqrt(betaV)   ;
  end;
  
  V=zeros(kPoints,1);
  % UP=zeros(kPoints,1);
  syms UP;
  for nn1=1:kPoints-1
      V(nn1)=(CHI*UP)./(tk(nn1)-betaV*OMG(nn1));
      S=solve(UP==-CHI*sum(V((nn1)))+1i*betaU*UP,UP);
  end;
  </code></pre>
  
  <p>MatLab gives an error saying: <code>DOUBLE cannot convert the input expression into
  a double array.</code>
  I'll appreciate any detailed help beforehand.
  Thank you</p>