code executes very slowly suddenly

7 views (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
  2 Comments
Jan
Jan on 11 Dec 2021
Edited: Jan on 11 Dec 2021
Without seeing the code and knowing any details, it is very unlikely that somebody guesses the reason of the problem. Matlb did not contain a magic "slow down at 9thode December" flag. Tjis means that something has been modified. So compare the backups of your code to finde the difference.
dpb
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)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!