T
T
Therapyx2017-08-10 16:12:09
MATLAB
Therapyx, 2017-08-10 16:12:09

How to make a simple trigger in MATLAB when a certain variable changes?

To describe the situation, we need the following architecture of interaction with matlab:
- Something like Java (let it be Java, because the product is internal) - connected to matlab through a plugin
- You can send any variable, let it be x and then return it from Java with a callback.
What is the problem? I can constantly send data to matlab by changing its value in matlab manually (when sending data is stopped). That does not fit into any gate.
Ideally, I would like to do something like a trigger on the matlab side with such a scenario (the simplest one), if the variable "x" has changed its value, then "execute" the trace function and push the result into another variable, which will be on the java side with n-th periodicity seconds is called from matlab.
Briefly: Data Stream -> Java -> MATLAB -> Java
I would be glad to the pros of MATLAB, I would like to discuss some of the nuances of the program in general, because there was a need, but I haven’t touched it in my life until today :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
x67, 2017-08-10
@x67

Why do you need matlab in this case? Does it do calculations? Maybe it will be more convenient to transfer them to a popular and open source language?
Matlab is good in its ecosystem, however, you can run a simulink and implement such logic inside it. But this is not the correct solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question