Matlab - Tengo u problema con mi uitable

 
Vista:

Tengo u problema con mi uitable

Publicado por Daniel (2 intervenciones) el 17/05/2013 06:02:29
Hola, necesito q me ayuden con mi uitable, tengo una matriz A de 24*24 elementos, necesito introducirla en la uitable, luego en las siguiente dos columnas reportar vectores texto fila y 24 columnas cada una y la siguiente nuevamente reportar un vector numerico.

kisiera q me kede asi manomenos

1 0 0 0 0 0 0 0..... 0 0 0 0 T(1,1) = 2
0 1 2 0 0 0 0 0..... 0 0 0 0 T(1,2) = 3
0 2 3 ................................. T(1,3) = 5
..................................................................
..................................................................
3 1 0 0 0 0 0 9 ...................T(4,6) = 3

lo que he creado es lo siguiente: mis variables estan en un archivo de datos: var.mat
dentro de este ia se encuentra mi matriz de 24*24 llamada "A" y mi vector columna de 24 elementos llamado "B"


PROGRAMA
===========================================================================

function varargout = Sistema(varargin)
% SISTEMA MATLAB code for Sistema.fig
% SISTEMA, by itself, creates a new SISTEMA or raises the existing
% singleton*.
%
% H = SISTEMA returns the handle to a new SISTEMA or the handle to
% the existing singleton*.
%
% SISTEMA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SISTEMA.M with the given input arguments.
%
% SISTEMA('Property','Value',...) creates a new SISTEMA or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Sistema_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Sistema_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 Sistema

% Last Modified by GUIDE v2.5 15-May-2013 02:41:30

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Sistema_OpeningFcn, ...
'gui_OutputFcn', @Sistema_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 Sistema is made visible.
function Sistema_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 Sistema (see VARARGIN)

%%v creacion de mis vectores texto

load var.mat
mtLiterales=cell(n,1);
mtLiterales2=cell(n,1);
pp=1;
hold on
for i=1:N
for j=1:M
fila=num2str(i);
colum=num2str(j);
x='T(';
coma=',';
y=')';
igual = '=';
Temp=[x,fila,coma,colum,y];
mtLiterales{pp,1}=Temp;
mtLiterales2{pp,1}=igual;
pp=pp+1;
end
end
mtLiterales=str2double(mtLiterales); %%%%% ESTO NO SE SI ESTE BIEN
mtLiterales2=str2double(mtLiterales2); %%%%%% ESTO NO SE SI ESTE BIEN
A(:,n+1)=mtLiterales;
A(:,n+2)=mtLiterales2;
A(:,n+3)=B;
set(handles.uitable1,'Data',A,'Columnformat',char(1:n,n+1)); %%%%% COMO SERIA EL REPORTE
% PORQUE ESE ESTA MAL

% Choose default command line output for Sistema
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder