Matlab Timer: how to use right data with drops?
Show older comments
Goodmorning everyone,
my application idea is pretty simple: I want to send through TCP/IP a row of a matrix at a fixed rate.
I wanted to used Timer function to unlock Matlab execution from the data stream.
The period is lower than my execution time. This is not a problem for my application, but I would like to send a specific row related to the specific timer execution, and I don't know how to do it properly.
As an example: I have a N x 6 matrix, and I have to send one row at each execution of the timer function. Let's say that the Period is 1s and function execution time is 1.3s.
T = 0 -> 1st execution of TimerFnc -> send row n° 1
T = 1s -> drop (TimerFnc is running)
T = 2s -> 2nd execution of TimerFnc -> send row n° 3
T = 3s -> drop (TimerFnc is running)
T = 4s -> 3rd execution of TimerFnc -> send row n° 5
As a result, the receiver should lose some data (which is not a problem), but at least it will receive the most "up to date" information, and will not back up.
Is there a way to do this?
Answers (0)
Categories
Find more on TCP/IP Communication in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!