How to Find Duplicate Entries and give popup message in the 50 different Edit Field in MATLAB App Designer ?

조회 수: 1 (최근 30일)
Hi,
I have some GUI created (as shown below), where i need to find duplicate entries and if duplicate it will show the popup message amoung all the entries in the edit field .Can you help me, how to find this.
Here I am going to enter the Text in Period Column which is editfield , simillarliy i have 50 different Tasks , Please help ?
  댓글 수: 2
Walter Roberson
Walter Roberson 2023년 9월 24일
Which fields have to be the same for something to be considered a duplicate?
How much leeway should there be in testing? For example if the delay for one is 1 millisecond and the delay for another is (1 millisecond plus 1 nanosecond) then should those be considered duplicates?
Anup Patil
Anup Patil 2023년 9월 24일
In Period Column in I am going to Enter Something Text, So that editfield i want to check whether it is duplicate with other field or not... Same for other field

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2023년 9월 25일
[groupnum, group_content] = findgroups(app.YourGUITable.Data.Period);
if numel(groupnum) == height(app.YourGUITTable.Data)
%there were no duplicates
else
for G = 1 : max(groupnum)
mask = groupnum == G;
if nnz(mask) > 1
rows_that_are_duplicates = find(mask);
content_that_is_duplicated = group_content{G};
%at this point produce your popup saying that the rows in
%rows_that_are_duplicates are duplicates of each other, with
%each one containing the same content_that_is_duplicated
end
end
end
%several popups might have been generated by this point -- one for each
%distinct Period that is duplicated

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by