Borrar filtros
Borrar filtros

export the script from already made GUI

4 visualizaciones (últimos 30 días)
Mehrdad Bahadori
Mehrdad Bahadori el 26 de Jul. de 2022
Comentada: Walter Roberson el 28 de Jul. de 2022
Hi everyone,
I have a GUI file for an instrument which is reading the data through USB and plotting it in real time.
I would like to export the data in real time and analyse it to give realtime feedback based on the data. How I can extract the script from the GUI file?
Thanks for your help!
  2 comentarios
Rik
Rik el 27 de Jul. de 2022
What exactly do you mean by GUI file?
Mehrdad Bahadori
Mehrdad Bahadori el 27 de Jul. de 2022
thanks for your reply Rik.
You can see the comment that I put for Walter below I explained in clearer way.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 27 de Jul. de 2022
If the GUI is written in MATLAB, then the source code is the "script", and if you want to extend the GUI to be able to do something else, you would modify the existing source code.
If you have a compiled GUI, a .exe, then you cannot extract the source code from it -- at least not in any easy way. In some circumstances it would be possible to "decompile" an executable, but it is often a pain to do.
  2 comentarios
Mehrdad Bahadori
Mehrdad Bahadori el 27 de Jul. de 2022
thanks Walter for you response. I think I was not clear enough.
In a more clear way, I have an script, including many fucntions to turn on, initializing reading data, and plotting data. The thing is, I want to export the data that is being plotted in real time. The function dedicated for collecting data is reading data from a callback function.
I am naive about callback function and that would be great if you can help me about this!
the structure of the script running the GUI is like this:
function Initialize
end
function start collection
end
function read data
CALLBACK FUCNTION READING DATA IS PLACED HERE
end
Walter Roberson
Walter Roberson el 28 de Jul. de 2022
I am not sure what the question is then?
You could modify the callback function to do whatever is required.
"export" the data is not general for us to give advice.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks 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