Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How select data from a table that have the same code field?

4 Ansichten (letzte 30 Tage)
MichaelO
MichaelO am 13 Mär. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have a excel table in which I have many columns but in the first one it is the type of data as it is shown in the image attached (A, B, C, D) and I want to program a popupmenu button in which I can select for example A and just work with all the data that has the letter A in the first column.
How can I write the code for that? I just have this code for the moment in which I make appeared no just the unique values A, B, C , D but A,A,A,A,B,B,B,B,B,B,C,C,C,.... etc. an so on.
[FileName,FilePath ]= uigetfile('*.xls');
ExPath = fullfile(FilePath, FileName);
set(handles.edit1,'string',ExPath)
Val=dataset('XLSFile',[FilePath,FileName]);
c1 = Val(:,1)
set(handles.popupmenu5,'string',dataset2cell(c1));
handles.Val = Val;
guidata(hObject, handles)
Thanks in advanced

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by