orivectors.m 528 B

123456789101112131415161718
  1. function [ori oriP oriN]=orivectors(n,d);
  2. %to be memorized oris (circle representation, "continous" model)
  3. ori=linspace(0,360,n+1);
  4. ori=ori(1:end-1); % ori vector in degrees
  5. ori=ori+unique(diff(ori))/2; % rotate awyy from cardinal
  6. %(I think was by half of the inter-ori distance?)
  7. % test oris (CCW and CW)
  8. oriP=ori+d;
  9. oriN=ori-d;
  10. % make everything radians
  11. ori=deg2rad(ori);
  12. oriP=deg2rad(oriP);
  13. oriN=deg2rad(oriN);
  14. end