Hi

I am new for octave software. I wrote a function in a file (file name is try3.m ) and ran

# try3.m file

function find_point(x, modulo)

xeq1=(x^3)+x+1;

xeq2 = mod(xeq1,modulo);

for i=0:(modulo-1)

yeq1=(i^2);

yeq2=mod(yeq1,modulo);

if (xeq2==yeq2)

printf("results:x= %d icin y=%d \n",x,i);

endif

endfor

endfunction

but I got this result:

>> try3

error: 'x' undefined near line 4 column 7

error: called from

try3.m at line 4 column 5

what is wrong? And I want to call this function from cli but how?

Thanks.

-----------------------------------------

Join us March 12-15 at CERN near Geneva

Switzerland for OctConf 2018. More info:

https://wiki.octave.org/OctConf_2018-----------------------------------------