n=10500 for i=n:n I=imread(['',num2str(i),'.png']); C=imagesc(I); [A, ret]=imcrop(C); F(i)=sum(A(:)); end for i=10000:n I=imread(['',num2str(i),'.png']); B=imcrop(I,ret); F(i)=sum(B(:)); end G=F(10000:n); G=G-min(G); G=G-G(1); MG=max(G)/2; for i=1:n-1 if (G(i+1)-MG >= 0 && G(i)-MG <= 0) break; end end locate=i if (locate < n-1) location = locate; else location = n; end filename = 'int4.xlsx'; xlswrite(filename,(G')); plot(smooth(G)) ylabel('\bfIntensity[a.u.]','FontSize',14); xlabel('\bfFrame','FontSize',14); % set(gca,'Fontsize',9,'FontWeight','bold','linewidth',1.5); figure filename = 'speed4.xlsx'; xlswrite(filename,(dG')); plot(smooth(dG)) ylabel('\bfThe rate of intensity[a.u.]','FontSize',14); xlabel('\bfFrame','FontSize',14); % set(gca,'Fontsize',9,'FontWeight','bold','linewidth',1.5);