Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How do i append a particular set of values into a already created uitable in matlab?
1 回表示 (過去 30 日間)
古いコメントを表示
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'};
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190285/image.png)
%
0 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!