How to represent a field inside a workspace variable in appdesigner?

1 Ansicht (letzte 30 Tage)
I am trying to make a graphical interface and I need to represent a series of graphs that are in the data field, inside a workspace variable. I have managed through a code to select a workspace variable, but I can not represent one of the fields within that variable. Would anyone know how to do it?

Akzeptierte Antwort

Srijith Kasaragod
Srijith Kasaragod am 2 Dez. 2021
Hi Sergio,
I understand that you wish to extract atleast one data field from the variable and generate a series of graphs. One way to achieve this would be to present the user a clickable UI, which could list all the fields in the variable using checkboxes. The user can select the required checkbox and the corresponding data can be read and further processed from the 'ValueChanged' function callback.
Regards.
  1 Kommentar
Sergio Prado Raposo
Sergio Prado Raposo am 2 Dez. 2021
Bearbeitet: Sergio Prado Raposo am 2 Dez. 2021
Hello Srijith,
What I have done has been to load in a dropbox all the variables that I have in the workspace with the following code:
methods (Access = private)
function update_menu(app, ~, ~)
vars = evalin('base', 'whos');
cell_array = cell(size(vars));
for i=1:length(vars)
cell_array{i} = vars(i).name;
end
app.ListaVariablesDropDown.Items = cell_array;
end
end
function startupFcn(app)
app.menu_timer = timer('ExecutionMode', 'fixedRate', ...
'Period', 1, ...
'TimerFcn', @app.update_menu);
start(app.menu_timer);
function UIFigureCloseRequest(app, event)
stop(app.menu_timer);
delete(app.menu_timer);
delete(app)
What I want now is: when I select the EEG variable, it will load me a field inside that variable, specifically the data field. And after that, it represents me in the same graph all the signals.
I don't know how to represent, for example 28 signals together. I have used the hold command, and it does not represent all together, if you can help me in this I would also appreciate it.
Thanks for answer!! Regards!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by