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.

linspacepixels.m 451 B

12345678910111213141516
  1. function f = linspacepixels(x1,x2,n)
  2. % function f = linspacepixels(x1,x2,n)
  3. %
  4. % <x1>,<x2> are numbers
  5. % <n> is the number of desired points
  6. %
  7. % return a vector of equally spaced points that can
  8. % be treated as centers of pixels whose total field-of-view
  9. % would be bounded by <x1> and <x2>.
  10. %
  11. % example:
  12. % isequal(linspacepixels(0,1,2),[.25 .75])
  13. dif = ((x2-x1)/n)/2; % half the difference between successive points
  14. f = linspace(x1+dif,x2-dif,n);