필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can i create a third uitable with the datas according to the data in the 1st and 2nd uitable in Matlab GUide?

조회 수: 2 (최근 30일)
I have three uitables 'Tracks,profiles,Markings' in matlab Guide with poredefined datas .I have a column called 'Location' in my 1st uitable and there is anoother column called 'No.of Lanes' in the second uitable. The third table should have column called 'Direction' with values such as as 'Direct,Inverse,Direct direct ..etc. 'Location' contains datas like City,Country and Highway.No.of Lanes contains values like 1,2,3,4.
I want ,if the user selects 'City' and 'no of lanes 'as 1 the third table should show 'direct inverse and both 'as pop up datas in the 3rd uitable in the direction column.If he chooses 'City' and no of Lanes as '2' some other pop datas should come in the 'Direction' column and so on.(which is to say if a user chooses a case in the 1st and the 2nd uitable third table should show a particular pop up data set)
I have already created a cellselecction callback which will know which is the case user selcts in 'Location' column .How do i see which data user selects in the 2nd Uitable profile in the same fucntion block.and how do i create the 3rd uitable.
I am attaching the table picutre for more clarity about the question.Kindly help me. Urgent help needed

답변 (1개)

Geoff Hayes
Geoff Hayes 2018년 4월 26일
sachin - since you probably have the handle to the second uitable and you know which element of that table you are interested in, then you should be able to get that value from within the cell selection (or perhaps edit?) callback of the first uitable. For example,
function uitable1_CellEditCallback(hObject, eventdata, handles)
table2Data = get(handles.uitable2, 'Data');
% check the cell element that you are interested in
% etc.
I'm using CellEditCallback as I suspect that you want to perform some kind of action only if the user has edited a cell in table 1.
  댓글 수: 2
sachin narain
sachin narain 2018년 4월 26일
HEy Geoff.I dont think you cant do it like this.I am trying to do like how you said.but it doesn work
Geoff Hayes
Geoff Hayes 2018년 4월 26일
Sachin - please clarify what you mean by it doesn't work. Please show your code and the full error message.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by