Download the master thesis - moeller
Transcript
242 APPENDIX G. USING AUTOMOD Figure G.9: Define a function for production engineers , who don’t have much experience with programming, this means that a lot of freedom has been taken from the developer, and a simple thing like declaring a new function is very difficult. You are not allowed just to write all your code in some source files and then compile them to run the program, instead you are forced to interact with the “Process System” GUI to make anything happen. For making a new source file, press the “Source Files” button in the process system, and type the name of the source file in the box seen in figure G.11, e.g. “F_calculate.m” and remember to put the extention “.m” on the name, otherwise the function will not work. Figure G.10: The source file window Figure G.11: Declare function name Once you have declared the name of the source file, press the “Edit” button, resulting in the opening of an editor as seen in figure G.12, wherein you write the logic for your function or process. The source file must contain the following for a function declaration: begin F _ c a l c u l a t e f u n c t i o n