how to solve index exceeds matrix dimensions in matlab

GaugeTypePanel=findobj('Tag','GaugeTypePanel');
GaugeTypetable=findobj('Parent',GaugeTypePanel,'Type','uitable');
GTtableData=get(GaugeTypetable,'Data');
TBW=4;
TBH=2;
pPpos=get(sdbTablePanel,'Position');
formatTable=uitable('Parent',vTabs(1),...
'Units','characters',...
'Position',[0.00 pPpos(4)-2*TBH-4 pPpos(3) TBH],...
'tag','sdbFormatTable',...
'ColumnFormat',repmat({transpose(GTtableData(:,1))},1,size(resultsInj,2)),...
'ColumnEditable',true(1,size(resultsInj,2)),...
'RowName',[],'ColumnName',[],...
'Data',[{'Skip'} {'Date/Time'} {'Skip'} repmat({'N/A'},1,size(resultsInj,2))]);
I get the error while executing line for formatTable. Please help!

2 comentarios

Well, what is the size of
vTabs
pPpos
GTableData
Also, make sure that you have no variable called
size
transpose
Hello Guillaume, Thanks for the reply. After debugging further, I found that the issue is related to the line transpose(GTtableData(:,1)) since GTtableData is an empty array. This is because the GaugeTypePanel returns an empty array.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Preguntada:

el 5 de Jun. de 2017

Comentada:

el 6 de Jun. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by