title: Ploting dates on x-axis in octave: "error: __plt2vv__: vector lengths must match"
body: <p>I'm trying to plot 3 lines on the same figure with dates on X-axis . I can do it perfectly on without having dates on x-axis but when I try to put years on x-axis I get this error : </p>
  
  <pre><code>    error: __plt2vv__: vector lengths must match
  </code></pre>
  
  <p>I'm not familiar with MATLAB and this is my first tiral , here is the part of my code where I try to plot : </p>
  
  <pre><code>        data = importdata('2.txt');
          C = data.data.';
          C = C';
  
          N = length(C);
          H = 12;
  
          w = ones(2 * H + 1, 1);
  
  
         Lambda_Tilde = NaN * zeros(N, 1);
         L_Tilde = NaN * zeros(N, 1);
         U_Tilde = NaN * zeros(N, 1);
         for t = (H+1):(N-H-1)
            Lambda_Tilde(t) = sum(w .* C(t-H:t+H)) / sum(w);
            L_Tilde(t) = poissinv(0.005, Lambda_Tilde(t));
            U_Tilde(t) = poissinv(0.995, Lambda_Tilde(t));
         end
  
  
  
        clf
        f=figure();
        t= (1996 : 2007);
        dateFormat = 10;
        datetick('x',dateFormat)
        plot(datenum(t,1,1), C, 'co*');
        hold on
        plot(datenum(t,1,1) , L_Tilde, 'g-.');
        plot(datenum(t,1,1) , U_Tilde, 'g-.');
        pause;
  </code></pre>
  
  <p>Now I understood where the problem is . C is a 1*144 Matrix, so is there a way to try to plot </p>
  
  <pre><code>     plot(1:N , C , 'co*' ) 
  </code></pre>
  
  <p>and having dates on xaxis instead of having random numbers? 
  I will appreciate any guidance . </p>