On Wednesday, 24 June 2020 21.03.15 WEST Samuel Doughty wrote:
> Thank you Doug and Andrew.
>
> When I move the function definitions to the beginning (right after the
> header line that reads %TestFile1.m), I still get errors, specifically --
>
> warning: function name 's1' does not agree with function filename
> 'C:\Users\Sam\Desktop\Octave\Tests\TestFile1.m' error: print: no figure to
> print
>
> Evidently there is something more that I'm missing.
> Sam
See the second answer here:
https://stackoverflow.com/questions/54013267/run-octave-script-file-containing-a-function-definition
that is due to the basic distinction between functions and scripts.
The line
1;
ensures that it is not a function and thus it is a script.
--
José Matos