Borrar filtros
Borrar filtros

Combine Matlab-Guide figures / Link a gui to another

3 visualizaciones (últimos 30 días)
Marten Amschler
Marten Amschler el 2 de Jun. de 2021
Comentada: Marten Amschler el 8 de Jun. de 2021
Hello Matlab specialists,
I have a (very komplex) GUI, based on Matlab guide. Nowadays I have a simple import function in my "Gui_1", that loads csv files. But in the future I'd like to support even more data types (even binaries)... so I want to replace the import function with a dedicated Converter. This converter should also be another GUI. Something like this:
Here is my question:
Is it possible to link/call the "Converter Gui" from within the "Processing Gui"?
Some additional information:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.7.0.1190202 (R2019b)
MATLAB License Number: #########
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19042)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.7 (R2019b)
GUI Layout Toolbox Version 2.3.4 (R2018b)
MATLAB Compiler Version 7.1 (R2019b)
>>
  3 comentarios
Rik
Rik el 2 de Jun. de 2021
I would strongly discourage splitting up your GUI in a fig and an m file. That tends to be difficult to adapt. Using only an m file has another advantage: versioning software like git can understand the changes you make.
For general advice and examples for how to create/edit a GUI (and avoid using GUIDE), have look at this thread.
Marten Amschler
Marten Amschler el 8 de Jun. de 2021
@Rik @Walter Roberson, thank you for your input. I don't see a "like" button so I'll just answer here. It looks more complicated than i'd hope it'll be.
unfortunately it's to late to let go of GUIDE. But I could create another "additional gui" inside of a GUIDE function and use globals to output the parameters?!
%% Example Code within GUIDE to create an "additional GUI"
function push_Converter_Callback(hObject, eventdata, handles)
global output
figure(1)
h = uicontrol('Style', 'pushbutton', 'String', 'Import Data',...
'Position', [10+100 10 100 25], 'Callback', @push_import);
h = uicontrol('Style', 'pushbutton', 'String', 'Convert',...
'Position', [125+100 10 100 25], 'Callback', @push_convert;
%-- imaginary "import" function within the "additional GUI"
function push_import(varargin)
global input output
[file, path] = uigetfile('*.csv','MultiSelect', 'on','import CSV-data (multiple)');
input = load([path,file]);
%-- imaginary "convert" function within the "additional GUI"
function push_convert(varargin)
global input output
output = convert(input)
that should also work, right?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by