title: Create and Plot Time Series Data in Matlab
body: <p>I have a (1x700) vector x for which I would like to create and plot a time series object in Matlab. Each observation corresponds to one month, and the first observation belongs to January 1960. I tried the following:</p>
  
  <pre><code>state1 = timeseries(x,1:size(x,2));
  
  state1.Name = 'Test';
  state1.TimeInfo.Units = 'months';
  state1.TimeInfo.StartDate = 'Jan-1960';     % Set start date.
  state1.TimeInfo.Format = 'yy';         % Set format for display on x-axis.
  state1.Time = state1.time - state1.time(1);      % Express time relative to the start date.
  
  plot(state1);
  </code></pre>
  
  <p>However, I still see numbers on the x-axis instead of years. Could anyone please help? Thanks in advance!</p>