% you can try different a and c until it looks right; quick test % image(-log(flipud(rot90(J))+eps));axis('square');axis('xy') % hold on % % testlightdark(a,c); function returnsnothing(a,c) f1=linspace(0,255,1000); f2=lightdarkcoon(f1,4,a,c); plot(f1,f2) axis([0 255 0 255]) axis('square')