Creating an 'accept all' option into existing function
Show older comments
I'm using a function for baseline removal from a series of spectra taken from a Raman mapping scan. However the scan consists of many individual spectra (typically >1000). Rather than having to manually accept each scan, how can I adjust the below function to automatically accept all?
function func_accept
global fig_h title_text axe_superimpose axe_bc edt_lamda edt_p d;
prog=get(fig_h,'UserData');
point=prog.point;
chroms=prog.chroms;
no_chroms=size(chroms,1);
prog.chroms_bc(point,:)=chroms(point,:)-prog.temp_tic;
point=point+1;
if point>no_chroms
msgbox('Baseline Correction Finished');
assignin('base','chroms_bc',prog.chroms_bc);
close(fig_h);
return
end
prog.point=point;
set(fig_h,'UserData',prog);
disp_string=['No. ' num2str(point) ', ' num2str(no_chroms) ' chromatogram(s) in total'];
title_text=uicontrol('Parent', fig_h,...
'Units', 'normalized',...
'Position',[.12 .96 .6 .028],...
'String',disp_string,...
'FontSize', 14,...
'FontWeight', 'bold',...
'Style','Text',...
'Tag','tip_text');
feval('func_show');
Answers (0)
Categories
Find more on Chemical Spectroscopy in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!