How can I add a drop-down menu for a certain column in a UItable in App Designer?
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Adham Salameh
el 5 de Oct. de 2020
I read data from excel file using readtable command as follows:
app.data=readtable("Data.xlsx",'Sheet',1);
app.UITable.Data = app.data;
app.UITable.ColumnName=app.data.Properties.VariableNames;
app.UITable.ColumnEditable = true;
The Data consists of 6 columns, I want to add drop-down menu to column 4, then a correspond value appears in column 5 based on the selection in column 4 and use the value in column 5 and multiple it with the value in column 3 and the asnwer appears in column 6
0 comentarios
Respuesta aceptada
Adam Danz
el 5 de Oct. de 2020
Editada: Adam Danz
el 6 de Oct. de 2020
Refer to Matlabs documentation on the uitable's ColumnFormat property which demonstrates how to set up pop-up menus within a column of a uitable by setting that columns' format as a cell array of options.
The ColumnEditable property of column 5 & 6 should be set to false since you plan to programmatically set those values.
The rest can be achieved by table indexing and whatever math you apply.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!