title: Matlab - ode15s "Too many Input Arguments"
body: <p>I am trying to create a program to solve a moment methods for a polymer reaction. However, when im run the code this error appears "Too many Input Arguments", any help? (sorry for bad english)</p>
  
  <p>Code:</p>
  
  <p>First function</p>
  
  <pre><code>function dydt = osc(t,y)
  
  
  ka1 = 10^6;
  ka2 = 0.15*10^6;
  kp = 2952;
  kd = 0.106*2952;
  ks = 10^6;
  
  
  %y=[C,A,ROH,I,M,Lambda,Mi] &lt;=&gt; y(1,:)=[C]   ;  y(2,:)=[A]
  %                              y(3,:)=[ROH] ;  y(4,:)=[I]
  %                              y(5,:)=[M]   ;  
  %                              y(6-8,:)=[Lambda] onde: %y(6) - lambda0 ; 
                                          y(7) - lambda1 ; y(8) - lambda2
  %                              y(9-11,:)=[Mi] onde: %y(9) - mi0 ; y(10) - 
                                          mi1 ; y(11) - mi2
  %                              y(12,:)=[R1] ; y(13;:) = [D1]
  
  
  j = 10; 
  syms n
  
  
  %Variables
  dydt(1,1) = - ka1*y(1)*y(3) + ka2*y(4)*y(2) - ka1*y(1)
  dydt(2,1) = + ka1*y(1)*y(3) - ka2*y(4)*y(2) + ka1*y(1)
  dydt(3,1) = - ka1*y(1)*y(3) + ka2*y(4)*y(2) - ks*y(3)*
  dydt(4,1) = - kp*y(5)*y(4) + kd*y(12) + ka1*y(1)*y(3) - ka2*y(4)*y(2) 
  %Living Chains
  dydt(6,1) = + ka1*y(1)*symsum((n^0)*y(9), n, [1 j]) 
  dydt(7,1) = + ka1*y(1)*symsum((n^1)*y(10), n, [1 j]) 
  dydt(8,1) = + ka1*y(1)*symsum((n^2)*y(11), n, [1 j])
  %Dormant Chains
  dydt(9,1) = - ka1*y(1)*symsum((n^0)*y(9), n, [1 j]) 
  dydt(10,1) = - ka1*y(1)*symsum((n^1)*y(10), n, [1 j]) + 
  dydt(11,1) = - ka1*y(1)*symsum((n^2)*y(11), n, [1 j]) 
  %R1 e D1
  dydt(12,1) = + kp*y(5)*y(4) - kp*y(5)*y(12) + kd*((y(12)+1) - y(12))
  dydt(13,1) = - ka1*y(1)*y(13) + ka2*y(2)*y(13) + ks*y(3)*y(12)
  
  end
  </code></pre>
  
  <p>Second function</p>
  
  <pre><code>function [t,y]= call_osc()
  
  %Tempo
  tspan = [0 1];
  
  %Initial conditions
  
  C = 2.582;
  A = 3.9*10^3;
  ROH = 0.387*10^2;
  I = 10^3;
  M = 1460.495;
  Rn0 = 0;
  Rn1 = 0;
  Rn2 = 0;
  Dn0 = 0;
  Dn1 = 0;
  Dn2 = 0;
  R1 = 1;
  D1 = 1;
  
  y0 = [C; A; ROH; I; M; Rn0; Rn1; Rn2; Dn0; Dn1; Dn2; R1; D1];
  
  [t,y] = ode15s(@osc, tspan, y0);
  disp(y(:,1))
  
  end
  </code></pre>