matlab to c conversion

1 回表示 (過去 30 日間)
ECE09 ITBHU
ECE09 ITBHU 2011 年 7 月 18 日
I have developed my code in matlab. It consists of nested loops (8 external loops each having 37000 loops). Thus i plan to convert the code in c language for fast result.At Present it is takes 30 minutes for execution.
I heard about CATALYTIC MCS and EMLC softwares. but could find link to download one. please suggest links for aforesaid softwares.

採用された回答

Chirag Gupta
Chirag Gupta 2011 年 7 月 18 日
The latest version of MATLAB (R2011a) has product called MATLAB Coder that can be used for the same

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 7 月 19 日
Possibly using the Parallel Programming Toolbox would be an useful alternative approach. And perhaps some of the loops can be vectorized.
Have you used the Profiler to determine which parts of your code are taking the most time?
  2 件のコメント
ECE09 ITBHU
ECE09 ITBHU 2011 年 7 月 19 日
Ya i found out the time taken, actually the inner loops (each of 37000) is accountable for this.
the code checks some parameters(basically changes around a value) in the digital data sample from 8 different sources(thats why 8 outer loops) for 37000 times. each time for one bit check. this cause 4-5 minutes for each loop in I3 processor laptops.
would conversion in C language be of sufficient help?
Walter Roberson
Walter Roberson 2011 年 7 月 19 日
I do am not sure why that kind of configuration would lead to 8 outer loops, rather than to a loop from 1:8 that indexed the appropriate variables and passed them in to a common processing loop? Or instead of a configuration with 8 loops, a configuration with BytesAvailableFcn callbacks that buffered the data and made it available to the processing function, possibly with the aid of some semaphores if part of the code might be waiting on data from some particular sensor to become available?
I am a bit confused about the data that is being read in from the sensors and how that relates to the "each time for one bit check" ?
How many cores are available on your system? Is the computation done at each point extensive, or is mostly a lot of data marshaling? Does the system need semi-realtime output, or is it the case that if in theory you managed to get all the data collected ahead of time (perhaps timestamped as to the order) the data could then be processed in a group to produce the output ?

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by