Matlab-Python: How to push user input from MATLab gui into python graphical interface?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
So I have a GUI in matlab with fields that relate to fields in Python interface program. What I want to do is let the user input information in the fields and with the press of a button it would push the data to the relevant data in python's interface. This would prevent the user having to input the info again. Are there any ways to go about this such as techniques, commands, etc..?
(btw I am totally new to this stuff esp. Python so sorry if I don't understand the technical diction)
0 comentarios
Respuestas (1)
Ashwini Venkatappa
el 9 de Feb. de 2017
Editada: Ashwini Venkatappa
el 9 de Feb. de 2017
In the call back function of the ui button of MATLAB GUI call the python function.
1. To call Python libraries from MATLAB, you need to install a supported version of the reference implementation (CPython) for Python. MATLAB supports versions 2.7 and 3.3. In order to check if Python is installed, execute the following command on your MATLAB command window:
>> pyversion
If all the fields of the result are empty, it indicates that either Python is not installed or the correct version of Python is not installed.
2. Check the bitness of Python version installed on your machine and the bitness of MATLAB session running on your machine. It is necessary to ensure that if you are working on a 64-bit (32-bit) installation of MATLAB, you have installed a 64-bit (32-bit) version of Python.
Note: Verify that "foo.py" Python script is present on Python's path. It is required for the Python script to be on Python's path to invoke the functions/ methods from this script.
Check for possible errors in "foo.py" by using it in Python. If the script does not work in Python, it will lead to errors when used from MATLAB.
0 comentarios
Ver también
Categorías
Más información sobre Call Python from MATLAB 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!