code executes very slowly suddenly

1 view (last 30 days)
Kishore Kumar
Kishore Kumar on 11 Dec 2021
Edited: Jan on 11 Dec 2021
Recently I am working on an application development that reads an external hardware and plots real time values in MATLAB. The program seems to work fine at frequency of 300Hz (300 sets of reading/second). The same program was altered to bring textual outputs at plot window using "uieditfield". This programm worked closer to 500Hz. This was the results I obtained last week.
I was trying to develop the same application in python to try out. But recently, when I try to run the same MATLAB code on the same laptop the frequency has dropped to 50Hz (graph plot) and 250Hz (textual output). Due to this I am losing sync while reading from the device and sync fails. I couldn't find any reasons why this happend. The external hardware works totally fine. I tried debugging by loading the data from csv and processing the data alone. Still the speed was less. I tried it on other pc, it was working good with the expected frequency.
So any reasons why this could happen?
I have not updated the MATLAB version
dpb on 11 Dec 2021
Is automagic OS update on? Could be the OS was updated w/o being aware of it.
Or, perhaps you picked up some additional malware if connected to internet...

Sign in to comment.

Answers (0)


Find more on Get Started with MATLAB 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!