Best practice to retrieve data from a large excel database based on GUI input

조회 수: 1 (최근 30일)
David O'Brien
David O'Brien 2016년 1월 8일
답변: Ingrid 2016년 1월 8일
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.

답변 (1개)

Ingrid
Ingrid 2016년 1월 8일
have you looked into the function ismember() with the option rows? It looks like this it what you are needing

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by