Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

spence15.m 575 B

1234567891011121314151617181920212223242526272829
  1. function yhat=spence15(y)
  2. % function for Spencer's 15-point graduation rule.
  3. % set out following Spencer's hand-calculation method,
  4. % which isn't the shortest computer program!
  5. osev = ones(7,1);
  6. n = length(y);
  7. y = [ osev*y(1); y; osev*y(n) ];
  8. n = length(y);
  9. k = 3:(n-2);
  10. a3 = y(k-1) + y(k) + y(k+1);
  11. a2 = y(k-2) + y(k+2);
  12. y1 = y(k)+3*(a3-a2);
  13. n = length(y1);
  14. k = 1:(n-3);
  15. y2 = y1(k)+y1(k+1)+y1(k+2)+y1(k+3);
  16. n = length(y2);
  17. k = 1:(n-3);
  18. y3 = y2(k)+y2(k+1)+y2(k+2)+y2(k+3);
  19. n = length(y3);
  20. k = 1:(n-4);
  21. y4 = y3(k)+y3(k+1)+y3(k+2)+y3(k+3)+y3(k+4);
  22. yhat = y4/320;
  23. return;