Matlab code

profileCirrus Hazard
image_to_txt.m

function image_to_txt() % I = double(imread('128_104_13_129x129_nowarp.bmp')); % I = max(imresize(I,[65,65],'cubic'),0); I = double(10*ones(65,65)); % I(16:20, 21:46) = 9; % I(21:25, 21:46) = 8; % I(26:30, 21:46) = 7; % I(31:35, 21:46) = 6; % I(36:40, 21:46) = 5; I(18:22, 24:49) = 9; I(23:27, 24:49) = 8; I(28:32, 24:49) = 7; I(33:37, 24:49) = 6; I(38:42, 24:49) = 5; fid = fopen('square_template.txt', 'wt'); for i = 1:size(I,1) for j = 1:size(I,2) fprintf(fid,'%8.4f ',I(i,j)); if j==size(I,2) fprintf(fid,'\n'); end end end fclose(fid); end