Best practice to retrieve data from a large excel database based on GUI input
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
I was wondering if there is some established/fast way to quickly retrieving selected values from a large excel database.
I have a GUI that takes in data selection parameters in form of listbox values, each listbox corresponds to a value within a column. After the user inputs value linked to C1, C2, and C3, the program should be able to locate C4.
For example, user selects from popup menus: "1A", then "1.1", and finally "1". In this case, there are two C4 values for the same C1-C3. The GUI then displays the average of 107 and 123.5.
The challenge here is that I do not know beforehand how many C4 values exist for a particular combination of C1-C3.
% Simple version:
C1 C2 C3 C4
1A 1.1 1 107.0
1A 1.1 1 123.5
B 1.1 1 143.9
BB 1.4 2 166.8
C 1.1 1 193.5
C 1.3 2 235.5
This feels like it could be easily solved using logicals/matrix operations, but I can't seem to figure it out.
0 个评论
回答(1 个)
Ingrid
2016-1-8
have you looked into the function ismember() with the option rows? It looks like this it what you are needing
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!