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

1 visualización (últimos 30 días)
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.

Respuestas (1)

Ingrid
Ingrid el 8 de En. de 2016
have you looked into the function ismember() with the option rows? It looks like this it what you are needing

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by