%COP Data Analysis Program by Andrea Stamp summer 1997 %Commercial use of this software must be approved by the author: imandie@bu.edu %This program analyzes center of pressure data and requires the following: % signals toolbox from MATLAB % cpdf.m plotgr.m % datcp.m plotmult.m % findtime.m plotraw.m % sparam.m % %This specific m file just sets up the graphical user interface for my program % Parameter setups for the control window h = figure; set(h,'name','Andrea''s COP Analysis Program'); set(h,'menubar','none'); set(h,'color',[0 0 0]); % Analyze pulldown menu analyze = uimenu(h,'Label','Analyze'); adattocp = uimenu(analyze,'Label','dat -> cp','CallBack','datcp,'); acptodf = uimenu(analyze,'Separator','on','Label','cp -> df','CallBack','cpdf,'); adattodf = uimenu(analyze,'Separator','on','Label','dat -> df','CallBack',['datcp,','cpdf,']); % Random Options pulldown menu options = uimenu(h,'Label','Random Options'); oparam = uimenu(options,'Label','Show Parameters','Checked','on','CallBack',['if strcmp(get(oparam,''Checked''),''off''),', 'set(oparam,''Checked'',''on''),','else,','set(oparam,''Checked'',''off''),','end,']); opoints = uimenu(options,'Separator','on','Label','# of data points'); o3000 = uimenu(opoints,'Label','3000','Checked','On','CallBack',['if strcmp(get(o3000,''Checked''),''off''),', 'set(o3000,''Checked'',''on''),','set(o6000,''Checked'',''off''),','end,']); o6000 = uimenu(opoints,'Label','6000','CallBack',['if strcmp(get(o6000,''Checked''),''off''),', 'set(o6000,''Checked'',''on''),','set(o3000,''Checked'',''off''),','end,']); % Graphics pulldown menu graphics = uimenu(h,'Label','Graphics'); greg = uimenu(graphics,'Label','Show Regression Lines','Checked','on','CallBack',['if strcmp(get(greg,''Checked''),''off''),', 'set(greg,''Checked'',''on''),','else,','set(greg,''Checked'',''off''),','end,']); gx = uimenu(graphics,'Separator','on','Label','X'); gxlin = uimenu(gx,'Label','Linear','Checked','on','CallBack',['if strcmp(get(gxlin,''Checked''),''off''),', 'set(gxlin,''Checked'',''on''),','else,','set(gxlin,''Checked'',''off''),','end,']); gxlog = uimenu(gx,'Label','Log','Checked','on','CallBack',['if strcmp(get(gxlog,''Checked''),''off''),', 'set(gxlog,''Checked'',''on''),','else,','set(gxlog,''Checked'',''off''),','end,']); gy = uimenu(graphics,'Label','Y'); gylin = uimenu(gy,'Label','Linear','Checked','on','CallBack',['if strcmp(get(gylin,''Checked''),''off''),', 'set(gylin,''Checked'',''on''),','else,','set(gylin,''Checked'',''off''),','end,']); gylog = uimenu(gy,'Label','Log','Checked','on','CallBack',['if strcmp(get(gylog,''Checked''),''off''),', 'set(gylog,''Checked'',''on''),','else,','set(gylog,''Checked'',''off''),','end,']); gr = uimenu(graphics,'Label','R'); grlin = uimenu(gr,'Label','Linear','Checked','on','CallBack',['if strcmp(get(grlin,''Checked''),''off''),', 'set(grlin,''Checked'',''on''),','else,','set(grlin,''Checked'',''off''),','end,']); grlog = uimenu(gr,'Label','Log','Checked','on','CallBack',['if strcmp(get(grlog,''Checked''),''off''),', 'set(grlog,''Checked'',''on''),','else,','set(grlog,''Checked'',''off''),','end,']); graw = uimenu(graphics,'Separator','on','Label','Plot Raw CP data', 'CallBack','plotraw,'); gmult = uimenu(graphics,'Separator','on','Label','Plot Multiple df files','CallBack','plotmult,'); % Editable box in lefthand corner of the screen fileframe = uicontrol(h,'Style','frame','Position',[0 310 315 110]); filetext = uicontrol(h,'Style','text','String','Input Options','Position',[35 365 200 50]); filenum = uicontrol(h,'Style','text','String','# of files:','Position',[5 375 65 20]); filenum2box = uicontrol(h,'Style','frame','Position',[100 375 50 20]); filenum2 = uicontrol(h,'Style','edit','String','10','foregroundcolor',[0 0 0],'Position',[100 375 50 20]); filepatho = uicontrol(h,'Style','text','String','Path to open from:','Position',[5 355 120 20]); filepatho2 = uicontrol(h,'Style','edit','String','/home/users/','foregroundColor',[0 0 0],'Position',[125 355 185 20]); filepathc = uicontrol(h,'Style','text','String','Path to save to:','Position',[7 335 100 20]); filepathc2 = uicontrol(h,'Style','edit','String','/home/users/','foregroundColor',[0 0 0],'Position',[125 335 185 20]); filedata = uicontrol(h,'Style','text','String','Files:','Position',[7 315 40 20]); filedata2 = uicontrol(h,'Style','edit','foregroundColor',[0 0 0],'Position',[45 315 265 20]); warning = uicontrol(h,'Style','frame','Position',[110 200 350 40]); warning2 = uicontrol(h,'Style','text','String','Warning: YOU MUST PRESS RETURN AFTER YOU','Position',[110 200 350 40],'foregroundcolor',[0 0 0]); warning3 = uicontrol(h,'Style','text','String','CHANGE THE TEXT IN THE OPTIONS BOX ABOVE','Position',[125 200 330 20],'foregroundcolor',[0 0 0]);