title: How to fix the error in MATLAB solving for symbolic variable
body: <p>I'm trying to find the eigenvalues of a system depending on a change in flow velocity. I have set up my equation to solve for alpha in terms of omega (omega is the eigenvalues) then I need to set the determinate of the alpha matrix (which I have named delta) to zero to solve for omega. However, I am receiving an error when setting up the matrix delta, specifically at delta(2,1:4) = alpha. The error is &quot;Unable to perform assignment because value of type 'sym' is not convertible to 'double'.&quot; I don't want to substitute in a random number however because that is what I am solving for!</p>
  <p>Here's my code:</p>
  <pre><code>%Set variables
  B = 0.1; %Beta
  u_cr = 10; %set critical velocity
  u_array = [0.1:0.1:u_cr]; %Range of velocities
  sym omega %Set omega to solve
  m = 1; %initialize u array
  q = 19; %initialize loop
  delta = zeros(4);
  real = zeros(1,q);
  imaginary = zeros (1,q);
  
  for j = 1:q
      u = u_array(m);
      F = [1 u^2 0 -2*(B^1/2)*u*omega -omega]; 
      alpha = (roots(F)).';
      delta(1,1:4) = 1;
      delta(2,1:4) = alpha;
      delta(3,1:4) = alpha.^2.*exp(1i.*alpha);
      delta(4,1:4) = alpha.^3.*exp(1i.*alpha);
      det(delta) = 0;
      real(m) = real(omega);
      imaginary(m) = imag(omega);
      m = m+1;
  end
  </code></pre>
  <p>Any suggestions on how to solve for omega and fix the error? Thanks in advance.</p>