function varargout = csvmulti(varargin) % CSVMULTI M-file for csvmulti.fig % CSVMULTI, by itself, creates a new CSVMULTI or raises the existing % singleton*. % % H = CSVMULTI returns the handle to a new CSVMULTI or the handle to % the existing singleton*. % % CSVMULTI('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in CSVMULTI.M with the given input arguments. % % CSVMULTI('Property','Value',...) creates a new CSVMULTI or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before csvmulti_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to csvmulti_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help csvmulti % Last Modified by GUIDE v2.5 08-Nov-2010 05:06:31 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @csvmulti_OpeningFcn, ... 'gui_OutputFcn', @csvmulti_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before csvmulti is made visible. function csvmulti_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to csvmulti (see VARARGIN) % Choose default command line output for csvmulti handles.archivos=varargin{1}; handles.T=zeros(1,4); set(handles.editA1,'String',handles.archivos{1}); set(handles.editA2,'String',handles.archivos{2}); set(handles.editA3,'String',handles.archivos{3}); set(handles.editA4,'String',handles.archivos{4}); set(handles.editA5,'String',handles.archivos{5}); set(handles.editB1,'String',handles.archivos{6}); set(handles.editB2,'String',handles.archivos{7}); set(handles.editB3,'String',handles.archivos{8}); set(handles.editB4,'String',handles.archivos{9}); set(handles.editB5,'String',handles.archivos{10}); set(handles.editC1,'String',handles.archivos{11}); set(handles.editC2,'String',handles.archivos{12}); set(handles.editC3,'String',handles.archivos{13}); set(handles.editC4,'String',handles.archivos{14}); set(handles.editC5,'String',handles.archivos{15}); for i=1:3 for j=1:5 handles.duracion(i,j)=0; handles.param(i,j)=0; end end for i=1:3 for j=1:5 if i==1; lugar=['A',num2str(j)]; elseif i==2 lugar=['B',num2str(j)]; else lugar=['C',num2str(j)]; end if isempty(handles.archivos{j+5*(i-1)})==0 [handles.duracion(i,j),handles.param(i,j)]=tamanyo(handles.archivos{j+5*(i-1)}); eval(['set(handles.textduracion',lugar,',''String'',',num2str(handles.duracion(i,j)),')']); eval(['set(handles.textparam',lugar,',''String'',',num2str(handles.param(i,j)),')']); [handles]=coherencia(i,j,handles); end end end % Update handles structure guidata(hObject, handles); % UIWAIT makes csvmulti wait for user response (see UIRESUME) uiwait(handles.figuremulti); % --- Outputs from this function are returned to the command line. function varargout = csvmulti_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure col=1; for j=1:5 for i=1:3 if handles.duracion(i,j)~=0 col=j; end end end handles.T(2)=handles.duracion(1,col); handles.T(3)=handles.T(2)+handles.duracion(2,col); handles.T(4)=handles.T(3)+handles.duracion(3,col); varargout{1} = handles.archivos; varargout{2} = handles.T; delete(handles.figuremulti); function editA1_Callback(hObject, eventdata, handles) % hObject handle to editA1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editA1 as text % str2double(get(hObject,'String')) returns contents of editA1 as a double handles.archivos{1}=get(handles.editA1,'String'); if isempty(handles.archivos{1})==0 try [handles.duracion(1,1),handles.param(1,1)]=tamanyo(handles.archivos{1}); set(handles.textduracionA1,'String',handles.duracion(1,1)); set(handles.textparamA1,'String',handles.param(1,1)); [handles]=coherencia(1,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA1,'String',''); handles.archivos{1}=''; handles.duracion(1,1)=0; handles.param(1,1)=0; set(handles.textduracionA1,'String',''); set(handles.textparamA1,'String',''); [handles]=coherencia(1,1,handles); end else handles.duracion(1,1)=0; handles.param(1,1)=0; set(handles.textduracionA1,'String',''); set(handles.textparamA1,'String',''); [handles]=coherencia(1,1,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editA1_CreateFcn(hObject, eventdata, handles) % hObject handle to editA1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonA1. function pushbuttonA1_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonA1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editA1,'String',[ruta,nombrearchivo]); handles.archivos{1}=[ruta,nombrearchivo]; try [handles.duracion(1,1),handles.param(1,1)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionA1,'String',handles.duracion(1,1)); set(handles.textparamA1,'String',handles.param(1,1)); [handles]=coherencia(1,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA1,'String',''); handles.archivos{1}=''; handles.duracion(1,1)=0; handles.param(1,1)=0; set(handles.textduracionA1,'String',''); set(handles.textparamA1,'String',''); [handles]=coherencia(1,1,handles); end end guidata(hObject, handles); function editA2_Callback(hObject, eventdata, handles) % hObject handle to editA2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editA2 as text % str2double(get(hObject,'String')) returns contents of editA2 as a double handles.archivos{2}=get(handles.editA2,'String'); if isempty(handles.archivos{2})==0 try [handles.duracion(1,2),handles.param(1,2)]=tamanyo(handles.archivos{2}); set(handles.textduracionA2,'String',handles.duracion(1,2)); set(handles.textparamA2,'String',handles.param(1,2)); [handles]=coherencia(1,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA2,'String',''); handles.archivos{2}=''; handles.duracion(1,2)=0; handles.param(1,2)=0; set(handles.textduracionA2,'String',''); set(handles.textparamA2,'String',''); [handles]=coherencia(1,2,handles); end else handles.duracion(1,2)=0; handles.param(1,2)=0; set(handles.textduracionA2,'String',''); set(handles.textparamA2,'String',''); [handles]=coherencia(1,2,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editA2_CreateFcn(hObject, eventdata, handles) % hObject handle to editA2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonA2. function pushbuttonA2_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonA2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editA2,'String',[ruta,nombrearchivo]); handles.archivos{2}=[ruta,nombrearchivo]; try [handles.duracion(1,2),handles.param(1,2)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionA2,'String',handles.duracion(1,2)); set(handles.textparamA2,'String',handles.param(1,2)); [handles]=coherencia(1,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA2,'String',''); handles.archivos{2}=''; handles.duracion(1,2)=0; handles.param(1,2)=0; set(handles.textduracionA2,'String',''); set(handles.textparamA2,'String',''); [handles]=coherencia(1,2,handles); end end guidata(hObject, handles); function editA3_Callback(hObject, eventdata, handles) % hObject handle to editA3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editA3 as text % str2double(get(hObject,'String')) returns contents of editA3 as a double handles.archivos{3}=get(handles.editA3,'String'); if isempty(handles.archivos{3})==0 try [handles.duracion(1,3),handles.param(1,3)]=tamanyo(handles.archivos{3}); set(handles.textduracionA3,'String',handles.duracion(1,3)); set(handles.textparamA3,'String',handles.param(1,3)); [handles]=coherencia(1,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA3,'String',''); handles.archivos{3}=''; handles.duracion(1,3)=0; handles.param(1,3)=0; set(handles.textduracionA3,'String',''); set(handles.textparamA3,'String',''); [handles]=coherencia(1,3,handles); end else handles.duracion(1,3)=0; handles.param(1,3)=0; set(handles.textduracionA3,'String',''); set(handles.textparamA3,'String',''); [handles]=coherencia(1,3,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editA3_CreateFcn(hObject, eventdata, handles) % hObject handle to editA3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonA3. function pushbuttonA3_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonA3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editA3,'String',[ruta,nombrearchivo]); handles.archivos{3}=[ruta,nombrearchivo]; try [handles.duracion(1,3),handles.param(1,3)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionA3,'String',handles.duracion(1,3)); set(handles.textparamA3,'String',handles.param(1,3)); [handles]=coherencia(1,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA3,'String',''); handles.archivos{3}=''; handles.duracion(1,3)=0; handles.param(1,3)=0; set(handles.textduracionA3,'String',''); set(handles.textparamA3,'String',''); [handles]=coherencia(1,3,handles); end end guidata(hObject, handles); function editA4_Callback(hObject, eventdata, handles) % hObject handle to editA4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editA4 as text % str2double(get(hObject,'String')) returns contents of editA4 as a double handles.archivos{4}=get(handles.editA4,'String'); if isempty(handles.archivos{4})==0 try [handles.duracion(1,4),handles.param(1,4)]=tamanyo(handles.archivos{4}); set(handles.textduracionA4,'String',handles.duracion(1,4)); set(handles.textparamA4,'String',handles.param(1,4)); [handles]=coherencia(1,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA4,'String',''); handles.archivos{4}=''; handles.duracion(1,4)=0; handles.param(1,4)=0; set(handles.textduracionA4,'String',''); set(handles.textparamA4,'String',''); [handles]=coherencia(1,4,handles); end else handles.duracion(1,4)=0; handles.param(1,4)=0; set(handles.textduracionA4,'String',''); set(handles.textparamA4,'String',''); [handles]=coherencia(1,4,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editA4_CreateFcn(hObject, eventdata, handles) % hObject handle to editA4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonA4. function pushbuttonA4_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonA4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editA4,'String',[ruta,nombrearchivo]); handles.archivos{4}=[ruta,nombrearchivo]; try [handles.duracion(1,4),handles.param(1,4)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionA4,'String',handles.duracion(1,4)); set(handles.textparamA4,'String',handles.param(1,4)); [handles]=coherencia(1,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA4,'String',''); handles.archivos{4}=''; handles.duracion(1,4)=0; handles.param(1,4)=0; set(handles.textduracionA4,'String',''); set(handles.textparamA4,'String',''); [handles]=coherencia(1,4,handles); end end guidata(hObject, handles); function editA5_Callback(hObject, eventdata, handles) % hObject handle to editA5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editA5 as text % str2double(get(hObject,'String')) returns contents of editA5 as a double handles.archivos{5}=get(handles.editA5,'String'); if isempty(handles.archivos{5})==0 try [handles.duracion(1,5),handles.param(1,5)]=tamanyo(handles.archivos{5}); set(handles.textduracionA5,'String',handles.duracion(1,5)); set(handles.textparamA5,'String',handles.param(1,5)); [handles]=coherencia(1,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA5,'String',''); handles.archivos{5}=''; handles.duracion(1,5)=0; handles.param(1,5)=0; set(handles.textduracionA5,'String',''); set(handles.textparamA5,'String',''); [handles]=coherencia(1,5,handles); end else handles.duracion(1,5)=0; handles.param(1,5)=0; set(handles.textduracionA5,'String',''); set(handles.textparamA5,'String',''); [handles]=coherencia(1,5,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editA5_CreateFcn(hObject, eventdata, handles) % hObject handle to editA5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonA5. function pushbuttonA5_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonA5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editA5,'String',[ruta,nombrearchivo]); handles.archivos{5}=[ruta,nombrearchivo]; try [handles.duracion(1,5),handles.param(1,5)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionA5,'String',handles.duracion(1,5)); set(handles.textparamA5,'String',handles.param(1,5)); [handles]=coherencia(1,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editA5,'String',''); handles.archivos{5}=''; handles.duracion(1,5)=0; handles.param(1,5)=0; set(handles.textduracionA5,'String',''); set(handles.textparamA5,'String',''); [handles]=coherencia(1,5,handles); end end guidata(hObject, handles); function editB1_Callback(hObject, eventdata, handles) % hObject handle to editB1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editB1 as text % str2double(get(hObject,'String')) returns contents of editB1 as a double handles.archivos{6}=get(handles.editB1,'String'); if isempty(handles.archivos{6})==0 try [handles.duracion(2,1),handles.param(2,1)]=tamanyo(handles.archivos{6}); set(handles.textduracionB1,'String',handles.duracion(2,1)); set(handles.textparamB1,'String',handles.param(2,1)); [handles]=coherencia(2,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB1,'String',''); handles.archivos{6}=''; handles.duracion(2,1)=0; handles.param(2,1)=0; set(handles.textduracionB1,'String',''); set(handles.textparamB1,'String',''); [handles]=coherencia(2,1,handles); end else handles.duracion(2,1)=0; handles.param(2,1)=0; set(handles.textduracionB1,'String',''); set(handles.textparamB1,'String',''); [handles]=coherencia(2,1,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editB1_CreateFcn(hObject, eventdata, handles) % hObject handle to editB1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonB1. function pushbuttonB1_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonB1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editB1,'String',[ruta,nombrearchivo]); handles.archivos{6}=[ruta,nombrearchivo]; try [handles.duracion(2,1),handles.param(2,1)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionB1,'String',handles.duracion(2,1)); set(handles.textparamB1,'String',handles.param(2,1)); [handles]=coherencia(2,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB1,'String',''); handles.archivos{6}=''; handles.duracion(2,1)=0; handles.param(2,1)=0; set(handles.textduracionB1,'String',''); set(handles.textparamB1,'String',''); [handles]=coherencia(2,1,handles); end end guidata(hObject, handles); function editB2_Callback(hObject, eventdata, handles) % hObject handle to editB2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editB2 as text % str2double(get(hObject,'String')) returns contents of editB2 as a double handles.archivos{7}=get(handles.editB2,'String'); if isempty(handles.archivos{7})==0 try [handles.duracion(2,2),handles.param(2,2)]=tamanyo(handles.archivos{7}); set(handles.textduracionB2,'String',handles.duracion(2,2)); set(handles.textparamB2,'String',handles.param(2,2)); [handles]=coherencia(2,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB2,'String',''); handles.archivos{7}=''; handles.duracion(2,2)=0; handles.param(2,2)=0; set(handles.textduracionB2,'String',''); set(handles.textparamB2,'String',''); [handles]=coherencia(2,2,handles); end else handles.duracion(2,2)=0; handles.param(2,2)=0; set(handles.textduracionB2,'String',''); set(handles.textparamB2,'String',''); [handles]=coherencia(2,2,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editB2_CreateFcn(hObject, eventdata, handles) % hObject handle to editB2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonB2. function pushbuttonB2_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonB2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editB2,'String',[ruta,nombrearchivo]); handles.archivos{7}=[ruta,nombrearchivo]; try [handles.duracion(2,2),handles.param(2,2)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionB2,'String',handles.duracion(2,2)); set(handles.textparamB2,'String',handles.param(2,2)); [handles]=coherencia(2,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB2,'String',''); handles.archivos{7}=''; handles.duracion(2,2)=0; handles.param(2,2)=0; set(handles.textduracionB2,'String',''); set(handles.textparamB2,'String',''); [handles]=coherencia(2,2,handles); end end guidata(hObject, handles); function editB3_Callback(hObject, eventdata, handles) % hObject handle to editB3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editB3 as text % str2double(get(hObject,'String')) returns contents of editB3 as a double handles.archivos{8}=get(handles.editB3,'String'); if isempty(handles.archivos{8})==0 try [handles.duracion(2,3),handles.param(2,3)]=tamanyo(handles.archivos{8}); set(handles.textduracionB3,'String',handles.duracion(2,3)); set(handles.textparamB3,'String',handles.param(2,3)); [handles]=coherencia(2,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB3,'String',''); handles.archivos{8}=''; handles.duracion(2,3)=0; handles.param(2,3)=0; set(handles.textduracionB3,'String',''); set(handles.textparamB3,'String',''); [handles]=coherencia(2,3,handles); end else handles.duracion(2,3)=0; handles.param(2,3)=0; set(handles.textduracionB3,'String',''); set(handles.textparamB3,'String',''); [handles]=coherencia(2,3,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editB3_CreateFcn(hObject, eventdata, handles) % hObject handle to editB3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonB3. function pushbuttonB3_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonB3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editB3,'String',[ruta,nombrearchivo]); handles.archivos{8}=[ruta,nombrearchivo]; try [handles.duracion(2,3),handles.param(2,3)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionB3,'String',handles.duracion(2,3)); set(handles.textparamB3,'String',handles.param(2,3)); [handles]=coherencia(2,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB3,'String',''); handles.archivos{8}=''; handles.duracion(2,3)=0; handles.param(2,3)=0; set(handles.textduracionB3,'String',''); set(handles.textparamB3,'String',''); [handles]=coherencia(2,3,handles); end end guidata(hObject, handles); function editB4_Callback(hObject, eventdata, handles) % hObject handle to editB4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editB4 as text % str2double(get(hObject,'String')) returns contents of editB4 as a double handles.archivos{9}=get(handles.editB4,'String'); if isempty(handles.archivos{9})==0 try [handles.duracion(2,4),handles.param(2,4)]=tamanyo(handles.archivos{9}); set(handles.textduracionB4,'String',handles.duracion(2,4)); set(handles.textparamB4,'String',handles.param(2,4)); [handles]=coherencia(2,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB4,'String',''); handles.archivos{9}=''; handles.duracion(2,4)=0; handles.param(2,4)=0; set(handles.textduracionB4,'String',''); set(handles.textparamB4,'String',''); [handles]=coherencia(2,4,handles); end else handles.duracion(2,4)=0; handles.param(2,4)=0; set(handles.textduracionB4,'String',''); set(handles.textparamB4,'String',''); [handles]=coherencia(2,4,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editB4_CreateFcn(hObject, eventdata, handles) % hObject handle to editB4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonB4. function pushbuttonB4_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonB4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editB4,'String',[ruta,nombrearchivo]); handles.archivos{9}=[ruta,nombrearchivo]; try [handles.duracion(2,4),handles.param(2,4)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionB4,'String',handles.duracion(2,4)); set(handles.textparamB4,'String',handles.param(2,4)); [handles]=coherencia(2,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB4,'String',''); handles.archivos{9}=''; handles.duracion(2,4)=0; handles.param(2,4)=0; set(handles.textduracionB4,'String',''); set(handles.textparamB4,'String',''); [handles]=coherencia(2,4,handles); end end guidata(hObject, handles); function editB5_Callback(hObject, eventdata, handles) % hObject handle to editB5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editB5 as text % str2double(get(hObject,'String')) returns contents of editB5 as a double handles.archivos{10}=get(handles.editB5,'String'); if isempty(handles.archivos{10})==0 try [handles.duracion(2,5),handles.param(2,5)]=tamanyo(handles.archivos{10}); set(handles.textduracionB5,'String',handles.duracion(2,5)); set(handles.textparamB5,'String',handles.param(2,5)); [handles]=coherencia(2,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB5,'String',''); handles.archivos{10}=''; handles.duracion(2,5)=0; handles.param(2,5)=0; set(handles.textduracionB5,'String',''); set(handles.textparamB5,'String',''); [handles]=coherencia(2,5,handles); end else handles.duracion(2,5)=0; handles.param(2,5)=0; set(handles.textduracionB5,'String',''); set(handles.textparamB5,'String',''); [handles]=coherencia(2,5,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editB5_CreateFcn(hObject, eventdata, handles) % hObject handle to editB5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonB5. function pushbuttonB5_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonB5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editB5,'String',[ruta,nombrearchivo]); handles.archivos{10}=[ruta,nombrearchivo]; try [handles.duracion(2,5),handles.param(2,5)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionB5,'String',handles.duracion(2,5)); set(handles.textparamB5,'String',handles.param(2,5)); [handles]=coherencia(2,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editB5,'String',''); handles.archivos{10}=''; handles.duracion(2,5)=0; handles.param(2,5)=0; set(handles.textduracionB5,'String',''); set(handles.textparamB5,'String',''); [handles]=coherencia(2,5,handles); end end guidata(hObject, handles); function editC1_Callback(hObject, eventdata, handles) % hObject handle to editC1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editC1 as text % str2double(get(hObject,'String')) returns contents of editC1 as a double handles.archivos{11}=get(handles.editC1,'String'); if isempty(handles.archivos{11})==0 try [handles.duracion(3,1),handles.param(3,1)]=tamanyo(handles.archivos{11}); set(handles.textduracionC1,'String',handles.duracion(3,1)); set(handles.textparamC1,'String',handles.param(3,1)); [handles]=coherencia(3,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC1,'String',''); handles.archivos{11}=''; handles.duracion(3,1)=0; handles.param(3,1)=0; set(handles.textduracionC1,'String',''); set(handles.textparamC1,'String',''); [handles]=coherencia(3,1,handles); end else handles.duracion(3,1)=0; handles.param(3,1)=0; set(handles.textduracionC1,'String',''); set(handles.textparamC1,'String',''); [handles]=coherencia(3,1,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editC1_CreateFcn(hObject, eventdata, handles) % hObject handle to editC1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonC1. function pushbuttonC1_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonC1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editC1,'String',[ruta,nombrearchivo]); handles.archivos{11}=[ruta,nombrearchivo]; try [handles.duracion(3,1),handles.param(3,1)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionC1,'String',handles.duracion(3,1)); set(handles.textparamC1,'String',handles.param(3,1)); [handles]=coherencia(3,1,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC1,'String',''); handles.archivos{11}=''; handles.duracion(3,1)=0; handles.param(3,1)=0; set(handles.textduracionC1,'String',''); set(handles.textparamC1,'String',''); [handles]=coherencia(3,1,handles); end end guidata(hObject, handles); function editC2_Callback(hObject, eventdata, handles) % hObject handle to editC2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editC2 as text % str2double(get(hObject,'String')) returns contents of editC2 as a double handles.archivos{12}=get(handles.editC2,'String'); if isempty(handles.archivos{12})==0 try [handles.duracion(3,2),handles.param(3,2)]=tamanyo(handles.archivos{12}); set(handles.textduracionC2,'String',handles.duracion(3,2)); set(handles.textparamC2,'String',handles.param(3,2)); [handles]=coherencia(3,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC2,'String',''); handles.archivos{12}=''; handles.duracion(3,2)=0; handles.param(3,2)=0; set(handles.textduracionC2,'String',''); set(handles.textparamC2,'String',''); [handles]=coherencia(3,2,handles); end else handles.duracion(3,2)=0; handles.param(3,2)=0; set(handles.textduracionC2,'String',''); set(handles.textparamC2,'String',''); [handles]=coherencia(3,2,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editC2_CreateFcn(hObject, eventdata, handles) % hObject handle to editC2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonC2. function pushbuttonC2_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonC2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editC2,'String',[ruta,nombrearchivo]); handles.archivos{12}=[ruta,nombrearchivo]; try [handles.duracion(3,2),handles.param(3,2)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionC2,'String',handles.duracion(3,2)); set(handles.textparamC2,'String',handles.param(3,2)); [handles]=coherencia(3,2,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC2,'String',''); handles.archivos{12}=''; handles.duracion(3,2)=0; handles.param(3,2)=0; set(handles.textduracionC2,'String',''); set(handles.textparamC2,'String',''); [handles]=coherencia(3,2,handles); end end guidata(hObject, handles); function editC3_Callback(hObject, eventdata, handles) % hObject handle to editC3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editC3 as text % str2double(get(hObject,'String')) returns contents of editC3 as a double handles.archivos{13}=get(handles.editC3,'String'); if isempty(handles.archivos{13})==0 try [handles.duracion(3,3),handles.param(3,3)]=tamanyo(handles.archivos{13}); set(handles.textduracionC3,'String',handles.duracion(3,3)); set(handles.textparamC3,'String',handles.param(3,3)); [handles]=coherencia(3,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC3,'String',''); handles.archivos{13}=''; handles.duracion(3,3)=0; handles.param(3,3)=0; set(handles.textduracionC3,'String',''); set(handles.textparamC3,'String',''); [handles]=coherencia(3,3,handles); end else handles.duracion(3,3)=0; handles.param(3,3)=0; set(handles.textduracionC3,'String',''); set(handles.textparamC3,'String',''); [handles]=coherencia(3,3,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editC3_CreateFcn(hObject, eventdata, handles) % hObject handle to editC3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonC3. function pushbuttonC3_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonC3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editC3,'String',[ruta,nombrearchivo]); handles.archivos{13}=[ruta,nombrearchivo]; try [handles.duracion(3,3),handles.param(3,3)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionC3,'String',handles.duracion(3,3)); set(handles.textparamC3,'String',handles.param(3,3)); [handles]=coherencia(3,3,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC3,'String',''); handles.archivos{13}=''; handles.duracion(3,3)=0; handles.param(3,3)=0; set(handles.textduracionC3,'String',''); set(handles.textparamC3,'String',''); [handles]=coherencia(3,3,handles); end end guidata(hObject, handles); function editC4_Callback(hObject, eventdata, handles) % hObject handle to editC4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editC4 as text % str2double(get(hObject,'String')) returns contents of editC4 as a double handles.archivos{14}=get(handles.editC4,'String'); if isempty(handles.archivos{14})==0 try [handles.duracion(3,4),handles.param(3,4)]=tamanyo(handles.archivos{14}); set(handles.textduracionC4,'String',handles.duracion(3,4)); set(handles.textparamC4,'String',handles.param(3,4)); [handles]=coherencia(3,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC4,'String',''); handles.archivos{14}=''; handles.duracion(3,4)=0; handles.param(3,4)=0; set(handles.textduracionC4,'String',''); set(handles.textparamC4,'String',''); [handles]=coherencia(3,4,handles); end else handles.duracion(3,4)=0; handles.param(3,4)=0; set(handles.textduracionC4,'String',''); set(handles.textparamC4,'String',''); [handles]=coherencia(3,4,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editC4_CreateFcn(hObject, eventdata, handles) % hObject handle to editC4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonC4. function pushbuttonC4_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonC4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editC4,'String',[ruta,nombrearchivo]); handles.archivos{14}=[ruta,nombrearchivo]; try [handles.duracion(3,4),handles.param(3,4)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionC4,'String',handles.duracion(3,4)); set(handles.textparamC4,'String',handles.param(3,4)); [handles]=coherencia(3,4,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC4,'String',''); handles.archivos{14}=''; handles.duracion(3,4)=0; handles.param(3,4)=0; set(handles.textduracionC4,'String',''); set(handles.textparamC4,'String',''); [handles]=coherencia(3,4,handles); end end guidata(hObject, handles); function editC5_Callback(hObject, eventdata, handles) % hObject handle to editC5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of editC5 as text % str2double(get(hObject,'String')) returns contents of editC5 as a double handles.archivos{15}=get(handles.editC5,'String'); if isempty(handles.archivos{15})==0 try [handles.duracion(3,5),handles.param(3,5)]=tamanyo(handles.archivos{15}); set(handles.textduracionC5,'String',handles.duracion(3,5)); set(handles.textparamC5,'String',handles.param(3,5)); [handles]=coherencia(3,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC5,'String',''); handles.archivos{15}=''; handles.duracion(3,5)=0; handles.param(3,5)=0; set(handles.textduracionC5,'String',''); set(handles.textparamC5,'String',''); [handles]=coherencia(3,5,handles); end else handles.duracion(3,5)=0; handles.param(3,5)=0; set(handles.textduracionC5,'String',''); set(handles.textparamC5,'String',''); [handles]=coherencia(3,5,handles); end guidata(hObject,handles); % --- Executes during object creation, after setting all properties. function editC5_CreateFcn(hObject, eventdata, handles) % hObject handle to editC5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbuttonC5. function pushbuttonC5_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonC5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [nombrearchivo,ruta,filtro] = uigetfile('*.csv', 'Seleccione un archivo de datos CSV'); if nombrearchivo~=0 set(handles.editC5,'String',[ruta,nombrearchivo]); handles.archivos{15}=[ruta,nombrearchivo]; try [handles.duracion(3,5),handles.param(3,5)]=tamanyo([ruta,nombrearchivo]); set(handles.textduracionC5,'String',handles.duracion(3,5)); set(handles.textparamC5,'String',handles.param(3,5)); [handles]=coherencia(3,5,handles); catch error warndlg('Archivo no válido.','Error de entrada','modal'); set(handles.editC5,'String',''); handles.archivos{15}=''; handles.duracion(3,5)=0; handles.param(3,5)=0; set(handles.textduracionC5,'String',''); set(handles.textparamC5,'String',''); [handles]=coherencia(3,5,handles); end end guidata(hObject, handles); % --- Executes on button press in pushbuttonaceptar. function pushbuttonaceptar_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonaceptar (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) uiresume(handles.figuremulti); % --- Executes when user attempts to close figuremulti. function figuremulti_CloseRequestFcn(hObject, eventdata, handles) % hObject handle to figuremulti (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: delete(hObject) closes the figure uiresume(handles.figuremulti); function [handles]=coherencia(a,b,handles) test=1; if (handles.duracion(a,b)~=0)&&(handles.param(a,b)~=0) for i=1:5 if handles.duracion(a,i)~=0 if handles.duracion(a,i)~=handles.duracion(a,b) test=0; end end end for j=1:3 if handles.param(j,b)~=0 if handles.param(j,b)~=handles.param(a,b) test=0; end end end else %caso de que hayamos vaciado un edit a2=0;%localización de una nueva referencia b2=0; for r=1:5 if handles.duracion(a,r)~=0 a2=a; b2=r; for i=1:5 if handles.duracion(a2,i)~=0 if handles.duracion(a2,i)~=handles.duracion(a2,b2) test=0; end end end break; end end a3=0;%localización de una nueva referencia b3=0; for s=1:3 if handles.param(s,b)~=0 a3=s; b3=b; for j=1:3 if handles.param(j,b3)~=0 if handles.param(j,b3)~=handles.duracion(a3,b3) test=0; end end end break; end end end if test==0 set(handles.textatencion,'String','¡Atención! Revisar coherencia'); else set(handles.textatencion,'String',''); end