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

1 ビュー (過去 30 日間)
Sergio Prado Raposo
Sergio Prado Raposo 2021 年 11 月 29 日
編集済み: Sergio Prado Raposo 2021 年 12 月 2 日
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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by