Cree una aplicación grafica y ahora quiero integrarle el codigo.
52 次查看(过去 30 天)
显示 更早的评论
Hola, Comunidad
tengo una pregunta yo cree un codigo script para unas funcionalidad e instrucciones de calculos númericos.
Por otro lado hice la interfaz grafica en designer, pero ahora quiero integrar mi codigo con mi diseño para que funcione, pero no tengo claro como hacerlo para que me funcionen mis botones con mis instrucciones.
Espero ser clara y me puedan guiar por favor.
1 个评论
Steven Lord
2024-11-7,16:00
Google Translate translation:
I have a question. I created a script code for some functionality and instructions for numerical calculations.
On the other hand, I created the graphical interface in designer, but now I want to integrate my code with my design so that it works, but I'm not sure how to do it so that my buttons work with my instructions.
I hope I'm clear and you can guide me please.
回答(1 个)
Sreeram
2024-11-11,6:47
Hi Patricia,
I understand that you are trying to call the script when a button in the app is clicked.
Say for example the script is named “myScript.m”. It can be invoked on click of a button by adding the command “myScript” inside the “ButtonPushed” callback of the button.
If you may want to pass some values from the app designer to the script, or get some computed values into the app, consider creating a function which takes necessary values as its argument, calls the script, and returns the value. A function may be called in the app designer in the same way it is called in scripts.
Here is a tutorial video on getting started with MATLAB App Designer:
You may consider referring to the documentation for tutorials and examples:
I hope it helps!
1 个评论
claudia
2024-11-11,13:16
编辑:Torsten
2024-11-11,13:51
hola, gracias por tu tiempo y respuestas. yo cree 2 funciones script.m, ya las probe sin interfaz y funcionan. Ahora me toca esas funciones crearle la interfaz grafica y que funcione ahi, ya cree la interfaz grafica tanto en designer como en GUI. pero no se como hago para llamar esas funciones dentro de la interfaz para que me funcione desde la interfaz grafia si me comprendes.
Es lo que no he logrado aún voy a ver tu video a ver si lo logro pero me ha costado un poco.
Translated:
Hello, thanks for your time and answers. I created 2 script.m functions, I already tested them without an interface and they work. Now it's my turn to create the graphical interface and have it work there, I already created the graphical interface in both designer and GUI. but I don't know how to call those functions within the interface so that it works for me from the graphical interface if you understand me.
This is what I haven't achieved yet, I'm going to watch your video to see if I can achieve it but it took me a while.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!