Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How do i append a particular set of values into a already created uitable in matlab?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I have a uitable with 8 columns.My 3rd column name is 'Number of Lanes' and 4th column name is 'Circulation'.I already have a list of values in 'Number of lanes' column like 1,2,3,4.What i need to do is as soon as the user presses 1 in the 'Number of lanes'column,the 'Circulation' column should have a set of data and the data looks like this 'both','direct','inverse' and these datas should be displayed as a list like in 'no.of lanes column'.How do i append the data to the Circulation column as soon as the user clicks 1 in the cell. i have used cellSelectioncall back fucntion for this. I will attach my table as well as the code i have written till now and also the uitable made in guide.
Kindly help me wuith this.
function table_Profils_CellSelectionCallback(hObject, eventdata, handles)
  ind_Lanes = eventdata.Indices;
  data = get(handles.table_Profils,'data') ; 
    no_ofLanes= cell2mat(data(ind_Lanes(1),3)) ;
    if double(no_ofLanes)
        no_ofLanes = num2str(no_ofLanes);    
    end
    switch no_ofLanes
        case '1'
          circulation = {'both','direct','inverse'};

%
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
