Target Language Compiler | ![]() ![]() |
"Hello World" Example with model.rtw File
Objective: What programming class would be complete without "Hello world"? In this exercise, you'll learn how to make simple modifications to grt.tlc
to generate a separate output file containing your code for hello.c
.
What benefit is there in this assignment? More advanced TLC programming applications may rely on your ability to generate a file. This example prepares you for virtually any auxiliary files.
Exercise
grt_assign.tlc
in matlabroot
/toolbox/rtw/rtwdemos/tlctutorial/helloworld
. Copy this file to grt.tlc
and create the necessary code to create hello.c
. You can run any model, for example, f14
or vdp
from Simulink demo and, as long as you use your special version of grt.tlc
, you will generate the file hello.c
.grt.tlc
and make changes accordingly.hello.c
.![]() | Solution | Generating Auxiliary Files for Batch FTP | ![]() |