Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Creating parameterized C code using RealTime Wrkshp???
Posted:
Jan 15, 1997 4:03 PM


I have the RealTime Workshop.
I need to convert a simulink diagram to C such that the variables remain in variable form.... i.e. so that the variable "x" in my simulink diagram will be created as "x" in the C code.
For example, suppose I've created a simulink diagram that multiples two variables "A" and "B"... and outputs this to "Yout"
A  *Yout  B
Simulink will not run unless you define "A" and "B" in the Matlab Envirnonment.... so suppose....
>> A=2; >> B=3;
when you do this and create the C code, the values 2 and 3 are inserted into the C code not the variables (letters) "A" and "B".
The MathWorks told me to:
modify a file called rt_main.c under the matlab root directory with a pathname codegen/rt/<hosttype>/ .
I was told that this can be done, and that people have done it...
ANY HELP ??
Thanks wasacz.1@osu.edu
 Bryon Wasacz Graduate Research Associate The Ohio State University Department of Mechanical Engineering 2021 Robinson Laboratory 206 W. 18th Avenue Columbus, OH 43210
(614) 2926315 wasacz.1@osu.edu



