title: How can I make Matlab recognize a time-delay system as symbolic?
body: <p>How can I make Matlab recognize a time-delay system as symbolic? I have:</p>
  
  <pre><code>syms t x y     % which should declare x &amp; y as functions of t
  X = [x; t]     % which are the variables of my system
  IC = [x0; y0]  % which are the initial conditions of my system
  
  prog = sosprogram(X);
  vec = monomials(X, 0:1:4);
  [prog, V] = sospolyvar(prog, vec, 'wscoeff');
  prog = sosineq(prog, V);
  
  dx = -2*x(t) - x(t-T);     % where T is the constant delay
  dy = -y(t) - x(t-T) - y(t-T);
  D = [dx; dy];     % my system
  
  Vd = -diff(V,x)*D(1) - diff(V,y)*D(2);
  </code></pre>
  
  <p>If I make a separate function handle according to the dde23 help page, where</p>
  
  <pre><code>D = @systemFunction;
  </code></pre>
  
  <p>then my script breaks at determining Vd and outputs an Error: Not enough input arguments (which I understand and want to do away with the function handle). But if I do away with the function handles and make systemFunction</p>
  
  <pre><code>dx = -2*x(t) - x(t-T);     % where T is the constant delay
  dy = -y(t) - x(t-T) - y(t-T);
  D = [dx; dy];     % my system
  </code></pre>
  
  <p>then it breaks because MATLAB won't recognize y(t-T) as the symbolic function y(t) with some delay T added. Is there anyway I can change this? I don't want to solve the system, but find a Lyapunov for it using SOSTools.</p>
  
  <p>My error message is:</p>
  
  <pre><code>Error using systemFunction.
  Not enough input arguments.
  Error in Script (line 50)
  Vd = -diff(V,x).*D(1)-diff(V,y).*D(2);
  </code></pre>
  
  <p>I know why I get this error. It's because I'm trying to call systemFunction without giving it all the relevant bits. So I want to do away with that. In order to do that, I need to know how to symbolically represent y(t-T) as y(t) with some delay T added.</p>
  
  <p>Edit: Added the relevant code and some additional explanation.</p>