matlab to c conversion

1 vue (au cours des 30 derniers jours)
ECE09 ITBHU
ECE09 ITBHU le 18 Juil 2011
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.

Réponse acceptée

Chirag Gupta
Chirag Gupta le 18 Juil 2011
The latest version of MATLAB (R2011a) has product called MATLAB Coder that can be used for the same

Plus de réponses (1)

Walter Roberson
Walter Roberson le 19 Juil 2011
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 commentaires
ECE09 ITBHU
ECE09 ITBHU le 19 Juil 2011
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 le 19 Juil 2011
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 ?

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by