Need to continuously gather mouse coordinates in the background after every 20 milliseconds in a separate thread.

1 view (last 30 days)
Hello all, A brief background to my question, currently I have written an experiment to gather data on how fast does a user can get accustomed to changes in the mouse rotation i.e. the mouse cursor would be moving at a rotated angle with respect to a center point on the screen. Now, one of the requirements of the experiment is to continuously track the mouse coordinates during the movement the upper limit for sampling shouldn't be more than 20-25 milliseconds. Now, without using any sort of multithreading I am able to achieve a sampling rate of 40-45 milliseconds which is not good enough. Could anyone tell me if there is any matlab feature I could use to achieve the desired sampling rate? I have tried using timers and spmd, even though both these approaches solved my problem, but it started affecting the main program, and caused delay in the experiments. I would be very grateful if someone could provide any input.

Answers (0)

Categories

Find more on Parallel Computing Fundamentals 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!