C code generation in matlab

Discussion in 'The Projects Forum' started by fuzzygourav, Dec 18, 2011.

  1. fuzzygourav

    Thread Starter New Member

    Dec 18, 2011
    4
    0
    guys.. some help here.. how can i generate stand alone c code for a set of rules in MATLAB. the code generators those i have used comes linked to the libraries and classes of MATLAB.. so i cant burn the program in the atmega 16 Microcontroller. i need a code generator that can be standlone and dosent need library functions of MATLAB.. some help here..
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    Point #1 is that Matlab is an interpreter. It is conceivable that you could use a Matlab program to generate C source code which you would then have to compile with a compiler that would generate output for an AVR. It will be SLOW!! Why not just write the code in C rather than Matlab and save yourself the extra step.
     
  3. fuzzygourav

    Thread Starter New Member

    Dec 18, 2011
    4
    0
    thanks for the suggestion but in case of heavy simulations how do i write the c code as they have huge no. of Rule sets..
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    I have no clue what you are trying to do. What I know is

    1. Target machine is a 8-bit AVR
    2. Source language is Matlab, or(?) Simulink -- Which?
    3. AVR won't rum Matlab
    4. A Desktop PC that will run Matlab is not an AVR
    From that I conclude that you have no chance of accomplishing your goal.
     
Loading...