Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How to change Simulink model into a C code to be used it to called from FORTRAN 95??
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!