|
From: | Doug Stewart |
Subject: | Re: I couldnt run function, I got error |
Date: | Wed, 7 Feb 2018 09:34:19 -0500 |
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
endforendfunctionbut 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.
-----------------
[Prev in Thread] | Current Thread | [Next in Thread] |