How to call a .m-file through a push button?

5 visualizaciones (últimos 30 días)
Febin Benjamin
Febin Benjamin el 24 de Jul. de 2013
I have written a .m file which is performing some operations. Now i want to to execute the .m file that i created through the push button control... When i'l press the button my .m-file will be called and it will be executed.... So how do i achieve this?

Respuesta aceptada

Jan
Jan el 24 de Jul. de 2013
Did you create a button in GUIDE already? Then append a callback function there also. It could have a name like this:
function button1_Callback(ObjectH, EventData)
Then all the code you need is the name of your function. Insert it in the callback, save the file and your are ready.
  6 comentarios
Jan
Jan el 26 de Jul. de 2013
@BSantos: Appending a question as a comment to an answer of another question cause confusions and does not allow to accept an answer. So please post this as a new question. Then add the a copy of the complete error message also. Thanks.
BSantos
BSantos el 29 de Jul. de 2013
@Jan Simon: Done! :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by