Hi,
I created a search box for finding in a certain column of a table different values. All good till now, that's easy, but i also want to create a popup menu where user can adust the search by selecting percentage (like 1%, 2%, 3% an so on). I dont know exactly how to explain in english, sorry.
Example: If the user want to search the number 15 and all the numbers before and after 15 with +- 2 (or 200%) , the result will be al rows containing 13, 14, 15, 16 and 17
Thanks !

댓글 수: 3

Jan
Jan 2022년 6월 14일
What exactly is your question? How to create a popupmenu? If so, in GUIDE, AppDesigner, or programmatically in a figure or uifigure? Or do you ask for comparing the values? Or is the problem how to display the results?
Cristian Martin
Cristian Martin 2022년 6월 14일
The pop-up menu will be created for user to choose the percent of increase or decrease round value of the central number. Let's say for 15 the round will be 200% or 300 % an so on
Cristian Martin
Cristian Martin 2022년 6월 14일
The question is about the code, how to find numbers around a fixed value with possibilities to increase or decrease the search?

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

 채택된 답변

ILoveMATLAB
ILoveMATLAB 2022년 6월 14일
편집: ILoveMATLAB 2022년 6월 14일

0 개 추천

All you have to do is use logical indexing. I assume you already do this to find the whole numbers
%Assume 13 and 17 are your limits, and tbl is your original table. Also assume col1 contains numbers.
TF = (tbl.col1>= 13) & (tbl.co1<=17)
filteredTbl = tbl(TF,:)
%If you replace 13 and 17 with variables your search becomes adjustable.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

제품

릴리스

R2015a

질문:

2022년 6월 14일

댓글:

2022년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by