Filter löschen
Filter löschen

Run a gui from a .mat file, save the variables from that gui and use them in the .mat code.

1 Ansicht (letzte 30 Tage)
i have a matlab code, in this program i use some images and save them as variables in the program. What i do is binarize an image (in a section of the code). For that i created a GUI that opens the image, converts it to grayscale and binarize the image. What i need to do is run the current program. In the required section, call my GUI, binarize the image in that GUI, save the binarized image and return to the program and continue with the other sections. How can i do that? calling the GUI and use the results from the gui in my code? I'm new at GUI's, i need a little help. Thanks.

Antworten (1)

Romain
Romain am 26 Mai 2014
I'm not sure to understand what you want to do, but a GUI function works like any other function. You can call it in function/script using
Outputs = MyGui(Inputs)
So you can call your GUI in the main program and the outputs of your GUI will be available in this program.
Hope to helps
  3 Kommentare
Romain
Romain am 26 Mai 2014
Bearbeitet: Romain am 26 Mai 2014
So my answer should answer your problem. Call your GUI like a function when needed, and you will be able to use the GUI Outputs latter in the code. You can use the function 'waitfor' to be sure to wait until your GUI is close before running the end of your program
doc waitfor
Alejandro
Alejandro am 26 Mai 2014
ok. i'm going to try that. I'll tell you later if i could do it and accept the answer. Thanks!

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by