Format NCdisplayGui.m
This commit is contained in:
@@ -1,146 +1,121 @@
|
|||||||
%% CALLED WHEN ACCESSING 'CurveFit Display' %%
|
%% CALLED WHEN ACCESSING 'CurveFit Display' %%
|
||||||
function [scLst, row, col] = NCdisplayGui(eDir) %(ExpPath)
|
function [scLst, row, col] = NCdisplayGui(eDir) %(ExpPath)
|
||||||
%global ExpPath
|
xPos=0.05;
|
||||||
%global expDir
|
btnWid=0.10;
|
||||||
|
btnHt=0.05;
|
||||||
xPos=0.05;
|
spacing=0.02; % Spacing between the button and the next command's label
|
||||||
btnWid=0.10;
|
|
||||||
btnHt=0.05;
|
% Figure
|
||||||
spacing=0.02;% Spacing between the button and the next command's label
|
|
||||||
|
|
||||||
%hSpot= figure;
|
|
||||||
%figure
|
|
||||||
%====================================
|
|
||||||
% The ADD Groups button
|
% The ADD Groups button
|
||||||
btnNumber=1;
|
btnNumber=1;
|
||||||
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
||||||
btnPos=[xPos yPos-spacing btnWid btnHt];
|
btnPos=[xPos yPos-spacing btnWid btnHt];
|
||||||
%
|
|
||||||
row=1;
|
|
||||||
hedit = uicontrol(...
|
|
||||||
'Style', 'edit',...
|
|
||||||
'String',row,...
|
|
||||||
'Units','normalized',...
|
|
||||||
'Position', btnPos,... % [.002 .70 .08 .10],...
|
|
||||||
'callback',{@editRowNum}); % 'Position', [5 100 60 20])
|
|
||||||
|
|
||||||
function editRowNum(source,~)
|
row=1;
|
||||||
user_entry = str2double(get(source,'string'));
|
hedit=uicontrol(...
|
||||||
|
'Style', 'edit',...
|
||||||
|
'String',row,...
|
||||||
|
'Units','normalized',...
|
||||||
|
'Position', btnPos,... % [.002 .70 .08 .10],...
|
||||||
|
'callback',{@editRowNum}); % 'Position', [5 100 60 20])
|
||||||
|
|
||||||
|
function editRowNum(source,~)
|
||||||
|
user_entry=str2double(get(source,'string'));
|
||||||
if (isnan(user_entry)||(user_entry<0)||(user_entry>17) )
|
if (isnan(user_entry)||(user_entry<0)||(user_entry>17) )
|
||||||
errordlg('Enter a Row between 1 and 16','Bad Input','modal')
|
errordlg('Enter a Row between 1 and 16','Bad Input','modal')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
row= user_entry;
|
row=user_entry;
|
||||||
|
end
|
||||||
end
|
|
||||||
%-------------------222222-----------
|
|
||||||
%
|
|
||||||
btnNumber=2;
|
|
||||||
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
|
||||||
btnPos=[xPos yPos-spacing btnWid btnHt];
|
|
||||||
|
|
||||||
|
|
||||||
col= 1;
|
btnNumber=2;
|
||||||
hedit = uicontrol(...
|
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
||||||
'Style', 'edit',...
|
btnPos=[xPos yPos-spacing btnWid btnHt];
|
||||||
'String',col,...
|
col=1;
|
||||||
'Units','normalized',...
|
hedit=uicontrol(...
|
||||||
'Position', btnPos,... % [.002 .70 .08 .10],...
|
'Style', 'edit',...
|
||||||
'callback',{@entryColNum}); % 'Position', [5 100 60 20])
|
'String',col,...
|
||||||
|
'Units','normalized',...
|
||||||
|
'Position', btnPos,... % [.002 .70 .08 .10],...
|
||||||
|
'callback',{@entryColNum}); % 'Position', [5 100 60 20])
|
||||||
|
|
||||||
function entryColNum(source,~)
|
function entryColNum(source,~)
|
||||||
user_entry = str2double(get(source,'string'));
|
user_entry=str2double(get(source,'string'));
|
||||||
if (isnan(user_entry)||(user_entry<0)||(user_entry>25))
|
if (isnan(user_entry)||(user_entry<0)||(user_entry>25))
|
||||||
errordlg('Enter a Column between 1 and 24','Bad Input','modal')
|
errordlg('Enter a Column between 1 and 24','Bad Input','modal')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
col= user_entry;
|
col=user_entry;
|
||||||
|
end
|
||||||
end
|
|
||||||
%}
|
|
||||||
|
|
||||||
%*************************************************************
|
% Read in numeric folder names
|
||||||
|
nlist=dir(fullfile(eDir,'*')); %(ExpPath,'*'));
|
||||||
%Ncode 12_0120 for reading in numeric folder names
|
nnn=0;
|
||||||
nlist=dir(fullfile(eDir,'*')); %(ExpPath,'*'));
|
for n=1:size(nlist,1)
|
||||||
nnn=0;
|
|
||||||
for n=1:size(nlist,1)
|
|
||||||
if (~isempty(str2num(nlist(n).name)))
|
if (~isempty(str2num(nlist(n).name)))
|
||||||
nnn=nnn+1;
|
nnn=nnn+1;
|
||||||
PnumLst(nnn)= (str2num(nlist(n).name));
|
PnumLst(nnn)=(str2num(nlist(n).name));
|
||||||
slst(nnn,1)={(nlist(n).name)};
|
slst(nnn,1)={nlist(n).name};
|
||||||
|
slst(nnn,1)={(nlist(n).name)};
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hListbox = uicontrol(...
|
hListbox=uicontrol(...
|
||||||
'Style', 'listbox',...
|
'Style', 'listbox',...
|
||||||
'String',sort(slst),...
|
'String',sort(slst),...
|
||||||
'value',[],...
|
'value',[],...
|
||||||
'max',1000,...
|
'max',1000,...
|
||||||
'min',1,...
|
'min',1,...
|
||||||
'Units','normalized',...
|
'Units','normalized',...
|
||||||
'Position', [.40 .40 .10 .60],...
|
'Position', [.40 .40 .10 .60],...
|
||||||
'callback',{@load_listbox}); %'uiresume(gcbf)'); 'Position', [5 100 60 20])
|
'callback',{@load_listbox}); %'uiresume(gcbf)'); 'Position', [5 100 60 20])
|
||||||
|
|
||||||
function load_listbox(source,~)
|
function load_listbox(source,~)
|
||||||
userIndx = (get(source,'value'));
|
userIndx=(get(source,'value'));
|
||||||
userStr = (get(source,'string'));
|
userStr=(get(source,'string'));
|
||||||
%scLstIndx= str2num(char(strrep(userStr(userIndx), 'Scan', '')))
|
%scLstIndx=str2num(char(strrep(userStr(userIndx), 'Scan', '')))
|
||||||
|
user_entry=userStr(userIndx);
|
||||||
user_entry=userStr(userIndx);
|
scLst=user_entry;
|
||||||
scLst= user_entry;
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
btnNumber=10;
|
||||||
|
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
||||||
|
btnPos=[xPos yPos-spacing btnWid btnHt];
|
||||||
|
|
||||||
|
hedit8=uicontrol(...
|
||||||
|
'Style', 'pushbutton',...
|
||||||
|
'String',{'Continue'},...
|
||||||
|
'Units','normalized',...
|
||||||
|
'Position', btnPos,...
|
||||||
|
'callback','uiresume(gcbf)');
|
||||||
|
|
||||||
|
% Labels
|
||||||
|
xLPos=0.175;
|
||||||
|
yPos=0;
|
||||||
|
btnWid=0.20;
|
||||||
|
lblNumber=1;
|
||||||
|
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
|
||||||
|
btnPos=[xLPos yPos-spacing btnWid btnHt];
|
||||||
|
htxt=uicontrol(...
|
||||||
|
'Style', 'text',...
|
||||||
|
'String','Row',...
|
||||||
|
'Units','normalized',...
|
||||||
|
'Position', btnPos);
|
||||||
|
|
||||||
|
lblNumber=2;
|
||||||
|
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
|
||||||
|
btnPos=[xLPos yPos-spacing btnWid btnHt];
|
||||||
|
|
||||||
%*****************************************************************
|
htxt=uicontrol(...
|
||||||
%-------------------10 10 10 10-----------
|
'Style', 'text',...
|
||||||
|
'String','Column',...
|
||||||
|
'Units','normalized',...
|
||||||
|
'Position', btnPos);
|
||||||
|
|
||||||
btnNumber=10;
|
|
||||||
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
|
|
||||||
btnPos=[xPos yPos-spacing btnWid btnHt];
|
|
||||||
|
|
||||||
hedit8 = uicontrol(...
|
|
||||||
'Style', 'pushbutton',...
|
|
||||||
'String',{'Continue'},...
|
|
||||||
'Units','normalized',...
|
|
||||||
'Position', btnPos,...
|
|
||||||
'callback','uiresume(gcbf)');
|
|
||||||
|
|
||||||
|
|
||||||
%------------------------------
|
|
||||||
|
|
||||||
%***************************************************************
|
|
||||||
% {
|
|
||||||
%********LABELS******************************
|
|
||||||
% The Labels
|
|
||||||
xLPos=0.175;
|
|
||||||
yPos=0;
|
|
||||||
btnWid=0.20;
|
|
||||||
|
|
||||||
|
|
||||||
% Removed Not needed for Ncode ImRobot
|
|
||||||
lblNumber=1;
|
|
||||||
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
|
|
||||||
btnPos=[xLPos yPos-spacing btnWid btnHt];
|
|
||||||
|
|
||||||
htxt = uicontrol(...
|
|
||||||
'Style', 'text',...
|
|
||||||
'String','Row',...
|
|
||||||
'Units','normalized',...
|
|
||||||
'Position', btnPos);
|
|
||||||
%-------------------222222-----------
|
|
||||||
lblNumber=2;
|
|
||||||
yPos=0.85-(lblNumber-1)*(btnHt+spacing);
|
|
||||||
btnPos=[xLPos yPos-spacing btnWid btnHt];
|
|
||||||
|
|
||||||
htxt = uicontrol(...
|
|
||||||
'Style', 'text',...
|
|
||||||
'String','Column',...
|
|
||||||
'Units','normalized',...
|
|
||||||
'Position', btnPos);
|
|
||||||
% Not needed for Ncode ImRobot
|
% Not needed for Ncode ImRobot
|
||||||
|
|
||||||
uiwait(gcf);
|
uiwait(gcf);
|
||||||
end %function end $$$$$
|
end %function end $$$$$[/INST]
|
||||||
|
|
||||||
%}
|
%}
|
||||||
%{
|
%{
|
||||||
%-------------------333333-----------
|
%-------------------333333-----------
|
||||||
|
|||||||
Reference in New Issue
Block a user