i'm try to write some code in octave based in false position method.
So, here it is:
And I get the follow error:
"parse error near line 40 of file C:\Users\HP...falsa.m
syntax error
else"
So, the point here, is that I actually know the meaning "parse error near the line 40" warning (it means something octave cannot understand). But a already tried to fixed and i´m still get the error.
What i'm missing?
Thanks for any help. Actually, i´m think my code is not very efficient. Some help would be great. Thanks again.

The second
ifstatement,if fun(x0)<0, has no correspondingendif, which should go before theelseon line 40.