From b1f89b5ba72e2b9091f177eab84fae976cfe336b Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 20 May 2014 08:54:33 -0400 Subject: added saving to filename with time stamp --- demo_diffraction_on_a_disk.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'demo_diffraction_on_a_disk.m') diff --git a/demo_diffraction_on_a_disk.m b/demo_diffraction_on_a_disk.m index 3eb511c..13f1ebe 100644 --- a/demo_diffraction_on_a_disk.m +++ b/demo_diffraction_on_a_disk.m @@ -58,7 +58,10 @@ tic; % start timer img_t=diffracted_image_at_target(img_source, xpos_s, ypos_s, img_t, xpos_t, ypos_t, z_t, lambda); toc % show evaluation time -imwrite(img_t/max(img_t(:)),'diffracted_image.png') +dstr = datestr(now,'yyyymmdd-HH:MM:SS'); +fname = strcat('diffracted_image', '_', dstr, '.png'); +img_t_intensiry = abs(img_t/max(img_t(:))).^2; +imwrite(img_t_intensiry, fname); % plot source and target images show_diffraction(img_source, xpos_s, ypos_s, img_t, xpos_t, ypos_t); -- cgit v1.2.3