From: clueless on 18 Nov 2009 01:43 i have exe file (created after compiliing C-code), is it possible to use it as a block in simulink? meaning, instead of writing the whole code again just to fit it to simulink model, just use the exe file. is this possible guys? thanks for the help =)
From: dk on 19 Nov 2009 03:44 On Nov 18, 11:43 am, "clueless " <mocor...(a)gmail.com> wrote: > i have exe file (created after compiliing C-code), is it possible to use it as a block in simulink? meaning, instead of writing the whole code again just to fit it to simulink model, just use the exe file. > > is this possible guys? > thanks for the help =) You should look into S-Function block of Simulink for integrating the existing C-code into Simulink Model.
From: Kenda on 20 Nov 2009 13:05 "Kenda " <nascar4us(a)hotmail.com> wrote in message <hduqvu$h8e$1(a)fred.mathworks.com>... > I am attempting to a simulink model that uses Embedded Matlab (I have created the model in Matlab, but I want to be able to run the model on computers w/o Matlab and not have to use the MCR). As the model stands now, constants are used as the inputs to the function. > > I have created a UI in VB that writes out a .txt file of inputs. I cannot figure out how to implement the .txt into the Simulink model. > > My questions are these: > 1) Is it possible to read in the .txt file into the Embedded matlab code (I cannot figure out how to to this. This option seems like it would emliminate the constants blocks.) > > 2) Is it possible to read in the .txt file into the generated C code from the Embedded Matlab model and reassign the value of the constants in the generated code (I cannot figure out how to do this.) > > 3) Which option is more feasible? > > In the research I've done, it seems that an S-function can be used to read in a file, but I can't figure out how to generate an S-function, even when trying to copy the example given in the documentation. > > Any and all help is appreciated. > > Thanks. Nobody can help me with this?!
|
Pages: 1 Prev: finding the point of inflexion Next: Removing sine noise in a picture |