title: simulating a 6 DOF robot in matlab robotic toolbox
body: <p>I am new with matlab and its robotic toolbox. I am trying to simulate a simple model of a 6 DOF manipulator in matlab but i got this error. Here is my code:</p>
  
  <pre><code>clc
  
  startup_rvc;  
  syms th1 th2 th3 th4 th5 
  %//////////robot  d-h////////////
  %%%%L= Link([ th d a alpha 'joint type'])%%%%
  L(1) = Link([th1 0.1519 0 -pi/2 ]);
  L(2) = Link([th2 0.1198 0.24365 0 ]);
  L(3) = Link([th3 -0.0925 0.21325 0 ]);
  L(4) = Link([th4 0.08505 0 -pi/2 ]);
  L(5)= Link([th5 0.08535 0 pi/2]);
  L(6)= Link([th6 0 0 0]);
  
  robot = SerialLink(L,'name','surgicalarm');
  q=[0 0 0 0 0];
  robot.plot(q)
  robot.teach();
  </code></pre>
  
  <p>but when I run this code I got this error:</p>
  
  <pre><code>Error using SerialLink/plot (line 205)
  Insufficient columns in q
  
  Error in surgicalarm (line 16)
  robot.plot(q)
  </code></pre>
  
  <p>Can anyone help me to fix this? Thanks.</p>