You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
243 B
Matlab

function I=define_ellipse(len,wid,eccentricity);
maxdiam=odd(len,1);
[x y]=meshgrid(-fix(maxdiam/2)-1:fix(maxdiam/2)+1,fix(-maxdiam/2)-1:fix(maxdiam/2)+1);
radius=sqrt((x.*eccentricity).^2+y.^2);
I=exp((-(radius-(len/2)).^2)./(0.5*wid.^2));