Generate C Code from MATLAB Coder

조회 수: 2 (최근 30일)
Pankaja Tanjore
Pankaja Tanjore 2015년 7월 10일
댓글: Ashish Uthama 2015년 7월 13일
Hello,
I have written the MATLAB code to Erode an image. I have tested the image in MATLAB and i am getting the correct output. I have generated the C code for this MATLAB code using MATLAB C Coder.
I am following the below mentioned steps to generate the C Code
i) Go to Apps => Click on MATLAB Coder .
ii)Browse and select the function for which you want to generate the C code .Click on Next
iii) Select the function and define the Input image type and size.Click on Next
iv)Click on Settings tab in the next page.Click on All
Support non-finite numbers : Select No (By default it is Yes) Click on Next
v)Click on Generate to generate C code.C code is generated successfully.
The following files are created : 1)Erode_Image.c 2)Erode_Image.h 3)Erode_Image_initialize.c 4)Erode_Image_initialize.h 5)Erode_Image_terminate.c 6)Erode_Image_terminate.h 7)Erode_Image_types.,h 8)padarray.c 9)padarray.h 10)rwtypes.h
Now I want to test this C code in Visual Studio by creating a test bench.
When i create a testbench and compile the project I am getting an error that 'libmwmorphop_nonflat_tbb.h' is not found.
This file is not existing in the generated C file.
It would be grateful if you let me know how to fix this problem.I need to test my generated c code in Visual Studio.
I am attaching here all the files that are generated from MATLAB C coder . I am also sending you the MATLAB code which i have written to Dilate the image.
Looking forward to hear from you at the earliest.
Thanks
Pankaja

답변 (1개)

Ashish Uthama
Ashish Uthama 2015년 7월 10일
Look at packNGo functionality. That should pack up all the required files for you in one zip file.
  댓글 수: 2
Pankaja Tanjore
Pankaja Tanjore 2015년 7월 11일
Hello, I am not clear about packNGo. It would be grateful if you let me know the procedure to do this.
Ashish Uthama
Ashish Uthama 2015년 7월 13일
Did you get a chance to click the link in my answer? It does have a step-by-step procedure.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by