Main Content

Deploy MATLAB Function on Hardware

  1. Deploy the MATLAB® function as a standalone executable on the hardware by using the deploy function.

    deploy(targetObj,'matlabFunction')

    For example:

    deploy(board,'blinkLED')
    Code generation successful: View report
    

    The deploy function initiates code generation of the blinkLED function. At the end of code generation, MATLAB generates a code generation report. Use this report to debug the blinkLED function for any build errors and warnings in the generated code.

    After successfully generating the code, the support package loads and runs the code as a standalone executable on the hardware. The executable starts blinking the ACT LED on the hardware every 0.5 seconds. The blinking continues for 100 cycles.

Related Topics