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

1 次查看(过去 30 天)
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?

采纳的回答

Srijith Kasaragod
Srijith Kasaragod 2021-12-2
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 个评论
Sergio Prado Raposo
编辑:Sergio Prado Raposo 2021-12-2
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!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by