Generate C Code from MATLAB Coder

3 ビュー (過去 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 Center および File ExchangeMATLAB Coder についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by