필터 지우기
필터 지우기

matlab to c conversion

조회 수: 2 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by