clear all; rmpath('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\positive\1.8_Amp'); rmpath('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\Matlab_Files\Root_Compare_Analysis'); %addpath('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\Matlab_Files\Root_Compare_Analysis\q6'); addpath('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\Matlab_Files\Root_Compare_Analysis'); %addpath('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\positive\1.8_Amp'); %cd('C:\Documents and Settings\setisadi\My Documents\MATLAB\analysis\Mar_18_2011\Q1_Scan\42mA\positive\2_Amp'); bg = imread('bg.png'); sg = imread('sg.png'); fid = fopen('sg.txt', 'w'); for n=1:576 fprintf(fid, '%d \n', sg(n,:)); end fclose(fid); imd_bg = double(bg(:,:,1)); imd_sg = double(sg(:,:,1)); %imd = imd_sg-imd_bg; imd = imd_sg; %imd = imd_bg; D=imd; %For 3d view uncommet line 29 and commet line 30 and 31 %For 2d view uncommet line 30 and 31 and commet line 29 %mesh(double(D)); G = D/1; %image(G); mesh(double(D)); axis xy; %ZLimMode=manual; %{auto} | manual %ZLim=10; %set('ZLimMode', manual); %set(gca, 'ZLim', 50); colorbar('ZTickLabel', [0:10:100] ); colormap(jet); set(gca, 'XTick', 0:100:768); set(gca, 'XTickLabel', [ 0:100:768] ); set(gca, 'YTick', 0:100:576); set(gca, 'YTickLabel', [ 0:100:576] ); %set(gca, 'ZTick', [0:10:50] ); %set(gca, 'ZTickLabel', [0:10:50] ); set(gca, 'ZTickLabel', [0:51:255] ); set(gca, 'ZTick', [0:51:255] ); %set(gca, 'ZTickLabel', [0:51:255] ); %set(gca, 'ZTick', [0:51:255] ); %title(['Signal Subtract Background']); title(['Signal']); %title(['Background']); xlabel('px'); ylabel('py');