The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Creating parameterized C code using Real-Time Wrkshp???
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Bryon E Wasacz

Posts: 3
Registered: 12/7/04
Creating parameterized C code using Real-Time Wrkshp???
Posted: Jan 15, 1997 4:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have the Real-Time 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"


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...



Bryon Wasacz
Graduate Research Associate
The Ohio State University
Department of Mechanical Engineering
2021 Robinson Laboratory
206 W. 18th Avenue
Columbus, OH 43210

(614) 292-6315

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.