help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble Using Functions


From: Nicholas Jankowski
Subject: Re: Trouble Using Functions
Date: Wed, 24 Jun 2020 16:16:31 -0400

> warning: function name 's1' does not agree with function filename 'C:\Users\Sam\Desktop\Octave\Tests\TestFile1.m'
> error: print: no figure to print
>

the warning is just telling you that normally the main function in a file should match the filename.  it's just a warning, so you can ignore it.

the error:  I don't think Octave's print function works as a command like you have it written for displaying text.  see

https://octave.sourceforge.io/octave/function/print.html  

it's really just meant for printing/saving plot images.

you might want to use disp() or printf()
https://octave.sourceforge.io/octave/function/disp.html 
https://octave.sourceforge.io/octave/function/printf.html 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]