Advertisement
Ch4osCosmo

Untitled

May 24th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function plotSeriesTrend(mu, sigma, y, coeffs)
  2. n=length(y);
  3. endPointX = [polyval(coeffs, 1), polyval(coeffs, n)];
  4. plot(1:1:n, y, '.')
  5. hold on
  6. plot([1,n], endPointX, 'r-.')
  7. hold on
  8. axisTitle = sprintf('Simulated series and linear trend: [mu,sigma,n] = [%f, %f, %d]', mu, sigma, n);
  9. title(axisTitle);
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement