How can I speed up my program ?

조회 수: 1 (최근 30일)
Zara Khan
Zara Khan 2019년 2월 16일
답변: Yair Altman 2019년 2월 17일
I am working with R2014b. whenever using cell array in my codes, it takes too much of the time to get the output. how to speed up my code ?
  댓글 수: 1
Yair Altman
Yair Altman 2019년 2월 16일
You did not include enough information in your question. Place a representative code snippet and timing measurements and then - maybe - someone will be able to assist you to find a faster alternative.

댓글을 달려면 로그인하십시오.

답변 (1개)

Yair Altman
Yair Altman 2019년 2월 17일
The first step you should do is to run your code in the Matlab Profiler. This will give you insight as to the specific bottleneck(s) in your code, and you can then focus your efforts to improve those.
For example, perhaps the main bottleneck is reading the disk file? or maybe parsing its data? or maybe the inner loop? Perhaps the loops run too many times than they should? perhaps you can calculate some loop computations outside the loop (rather than repeatedly within it)?
- All these are examples of questions that can only be answered once you have run your code in the Profiler and analyzed the reported results.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by