title: an error while running a code that has 'lsim' command
body: <p>I want to run the following code but I keep getting this error:</p>
  
  <p>Error using DynamicSystem/lsim (line 85)
  When simulating the response to a specific input signal, the input data U must be a
  matrix with as many rows as samples in the time vector T, and as many columns as input
  channels.</p>
  
  <p>the code is:</p>
  
  <hr>
  
  <pre><code>V=300;
  Vdc=700;
  L=10*10^-3;
  C=1500*10^-6;
  R=1;
  Dd=sqrt(2)*300/700;
  w=2*pi*50;
  A=[-R/L w -Dd/L 0 0;
      -w -R/L -Dd/L 0 0;
      (3*Dd)/2*C 0 0 0 0;
      0 1 0 0 0;
      0 0 1 0 0;];
  B=[-Vdc/L 0;
      0 -Vdc/L;
      0 0;
      0 0;
      0 0;];
  C=[1 0 0 0 0;
      0 1 0 0 0;
      0 0 1 0 0;];
  D=[0 0;
      0 0;
      0 0;];
  states={'id','iq','vdc','iq_dot','vdc_dot'};
  inputs={'dd','dq'};
  outputs={'id','iq','vdc'};
  sys_ss=ss(A,B,C,D,'statename',states,'inputname',inputs,'outputname',outputs);
  Q=eye(5);
  I=eye(2);
  K=lqr(A,B,Q,I);
  Ac=[(A-B*K)];
  Bc=[B];
  Cc=[C];
  Dc=[D];
  states={'id','iq','vdc','iq_dot','vdc_dot'};
  inputs={'r'};
  outputs={'id','iq','vdc'};
  sys_cl=ss(Ac,Bc,Cc,Dc,'statename',states,'inputname',inputs,'outputname',outputs);
  x0=[0.1,0.1,0.1];
  t=0:0.01:5;
  r=zeros(size(t));
  [y,t]=lsim(sys_cl,r,t,x0);
  plot(t,y)
  </code></pre>
  
  <p>any help is highly appreciated.</p>
  
  <hr>