function varargout = uitableguide4(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @uitableguide4_OpeningFcn, ...
'gui_OutputFcn', @uitableguide4_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
function uitableguide4_OpeningFcn(hObject, eventdata, handles, varargin)
columnas=4;
filas=2;
num_elem=cell(filas,columnas);
num_elem(:,:)={''};
set(handles.uitable1,'Data',num_elem);
set(handles.uitable1,'ColumnEditable',true(1,2));
nombres={'Datos'};
set(handles.uitable1,'ColumnName',nombres)
nombres={'Barra1-1','Barra1-2','Barra2-1','Barra2-2'};
set(handles.uitable1,'RowName',nombres)
handles.output = hObject;
guidata(hObject, handles);
function varargout = uitableguide4_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function barras_Callback(hObject, eventdata, handles)
n=str2double(get(handles.barras,'string'));
nombres={'Datos'};
set(handles.uitable2,'ColumnName',nombres)
k=1;
for a2=1:n
for a1=1:n
nombre{k,1}=sprintf('BARRA %d - %d',a2,a1);
k=k+1;
end
end
set(handles.uitable2,'RowName',nombre)
filas=k;
columnas=1;
num_elem=cell(filas,columnas);
num_elem(1:filas,1:columnas)={' '};
set(handles.uitable2,'Data',num_elem);
set(handles.uitable2,'ColumnEditable',true(1,2));