function [top,bot,lft,rgt] = halfspot_fluc(M,spotr,spotc,thresh) %HALFSPOT_FLUC Inputs a 3D array of Hartmann sensor images, along with an %approximate spot location and intensity threshhold. Finds a spot on the %first image near (spotc,spotr) and defines boundary of spot near an %intensity of 'thresh'. Outputs fluctuations of the intensity sums of the %top, bottom, left and right halves of the spot about their means, and %graphs these against each other automatically. [I,r0,c0]=spotfind(M,thresh,spotr,spotc); [r,c]=singspotcent(I); [top,bot,lft,rgt]=hemiadd(I,r,c) subplot(2,1,1) title(['Spot centered at (' num2str(round(c0+c)) ',' num2str(round(r0+r)) '):' 'Intensity Deviation of Top/Bottoms Halves']) end