フィルターのクリア

How to optimize MATLAB code to execute within the available time limit?

12 ビュー (過去 30 日間)
Candy Lau
Candy Lau 2022 年 6 月 10 日
回答済み: Ganesh Gudipati 2022 年 6 月 16 日
Hi all. I am doing a ThingSpeak Visualisation to present a map for a monitoring system. At the begining stage, all the code can be executed very well and all the plots on the map are visible successfully. However, today when I try to check on the performance of Thingspeak, I found that there is a error occured in my visualization's output. In the window, it written that 'MATLAB code has not completed execution within the allocated time.Consider optimizing your MATLAB code to execute within the available time limit.'.
What should I do to address this issue? Hope anyone can answering me. Thanks in advance.
  1 件のコメント
John D'Errico
John D'Errico 2022 年 6 月 10 日
Without seeing any code, you need to write better code. Faster would be good.

サインインしてコメントする。

回答 (1 件)

Ganesh Gudipati
Ganesh Gudipati 2022 年 6 月 16 日
Hi,
As per my understanding the MATLAB code you have is taking more than the allocated time.
If you are intrested to use C or CPP you can try this workaround.
  • Since it is hard and time taking to code whole application again in C or CPP, identify the portions of code in MATLAB that are taking long excution time.
  • Try to code them in C or CPP.
  • Now you can utilize MEX to build C or CPP MEX function and then you can use them as general MATLAB functions.
This can significantly speed up your application.
For more information refer Build C Mex function

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeThingSpeak についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by