How to run an external Matlab(.m) files and call its functions from an application code-view file?
8 次查看(过去 30 天)
显示 更早的评论
Here is the more content about the question:
- I have created 3 different Matlab scripts with OOP (object oriented programming) to operate 2 different Keysight signal analyser and generator, including a Nema 17 stepper motor.
- All of these scripts are functioning perfectly as per my requirements
- For Keysight instruments, a connection with Matlab is required and for that three different ‘class’ are defined separately within each file for the hardware
- I created many Matlab functions for individual tasks using SCPI programming language to operate(control) the Keysight instruments and to receive the values of the power and frequency of the signal
- Now I want to use all these three scripts running in the background and want to use its functions working in an Matlab application, so basically I want to call the functions from predesigned scripts into a single application code to get the values and to control the instruments using the buttons
- So, how do I run these scripts and use the functions in the application code?
- Problems/requirements: 1. I cannot define more than one class within a single Matlab script. 2. If there is no class with defined object for a specific hardware I cannot use its functions designed for that particular hardware. 3. To establish connections and creating an object into the system, I need to run the scripts in the background first and then it is possible to use the functions
- Please suggest me how can I solve this problem because I have been going through all the available resources but unfortunately I couldn’t find any reasonable answer
your assistance would be greatly appreciated
Thank you.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Connection and Communication 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!