How to convert C code to SImulink Model

I have a C Code for each model for our project.Can it be converted to Simulink Model automatically in Matlab or Should I use any functions for it?

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020년 9월 8일

0 개 추천

Yes, it is feasible with some restrictions. You'd need to convert to S-functions.

댓글 수: 2

deepika ravi
deepika ravi 2020년 9월 9일
Can i able to get the exact simulink model, or only an function block of the c code
You get a function block that can call the C code.
I do not know of any program that can translate C into equivalent MATLAB or Simulink -- at least that does not cheat by using the Simulink ability to inject C code.
C uses pointers a lot, and there are a lot of C data structures that would require that handle classes be generated for them. For example a simple linked list in C would require a handle class be generated because MATLAB does not have pointers.

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

카테고리

도움말 센터File Exchange에서 Event Functions에 대해 자세히 알아보기

태그

질문:

2020년 9월 8일

댓글:

2020년 9월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by