Section: FreeMat Functions
source
function executes the contents of the given
filename one line at a time (as if it had been typed at
the -->
prompt). The source
function syntax is
source(filename)
where filename
is a string
containing the name of
the file to process.
.m
extension):
--> fp = fopen('source_test','w'); --> fprintf(fp,'a = 32;\n'); --> fprintf(fp,'b = a;\n'); --> fclose(fp);
Now we source the resulting file.
--> clear all --> source source_test --> who Variable Name Type Flags Size a int32 [1 1] b int32 [1 1]