Skip to main content
1-Visitor
Feb 28, 2015 6:11 PM UTC
Question

Bisection Method using Prime 3

Hi

I'm using prime 3 and I want to write a bisection method code but I'm getting an error as follow :

1/ I can't write (i+1) as a subscript for the variable name.

For this problem, I think I solved it by defining a new variable j as (i+1), but I'm not sure if this is correct or not ?

2/ I get an error telling me that the (ai) variable is undefined !!

Please help and see the attachment

4 replies

1-Visitor
Feb 28, 2015 6:32 PM UTC

To index a vector you have to use the vector index (]), not the literal index (Ctrl -).

Translate
1-Visitor
Feb 28, 2015 7:28 PM UTC

Thank you so much. It is working now.

Translate
24-Ruby IV
Feb 28, 2015 6:45 PM UTC

May by so

bic.png

Translate
1-Visitor
Feb 28, 2015 7:29 PM UTC

Thank you for your time and effort.

Translate