필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to change Simulink model into a C code to be used it to called from FORTRAN 95??

조회 수: 1 (최근 30일)
mostafa haggag
mostafa haggag 2018년 11월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
Hey!
I made a controller on simulink with input ports and output ports. I wanted to convert it to c code to be called from FORTRAN 95. A C function could be called from FORTRAN 95 . I am have some problems concerning the simulink model convertion to C.
Please put into consideration that the code used in FORTRAN 95 is a simulation code which is simulating a model with a fixed time step. I want to implement the controller to work with the model on this fixed time step. The controller will be called at every time step to calculate the output and send it back to fortran model/
I was wondering what configuration settings should I choose in the simulink to make c work properly with FORTRAN 95.
I have no experience related turning models into C code. I wanted to ask few things first. What solver should I choose ? I chose the type to be a fixed step equal to 0.5(as my simulation time step is fixed equal to 0.5) but I am not sure what solver should I choose. I read that I should change the solver to discrete with no continous states. I was wondering what is the meaning a continous states ? or should I choose another option ? Is there some block that i should change if I chose the solver to be discrete?
Also, in the code generation, what system target file should I choose ?
I read that I should choose grt.tlc or ert_shrlib.tlc. What is the difference between both ?
is there any other options i should choose when I am generating the C code ?
thank you so much

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by