필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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.

답변 (1개)

Romain
Romain 2014년 5월 26일
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
Romain
Romain 2014년 5월 26일
편집: Romain 2014년 5월 26일
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 2014년 5월 26일
ok. i'm going to try that. I'll tell you later if i could do it and accept the answer. Thanks!

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by