cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Convert vector element into a scaler for evaluation in a while loop

ThermoStan
1-Newbie

Convert vector element into a scaler for evaluation in a while loop

Hi all,

I am attempting to extract a vector element piecewise within a while loop and assign it to the while evaluation variable for test.  I am able t do this once before I enter the loop but I cannot do this once in the loop and I get the "Array index is invalid message".  Is there a way to conveniently extract the element and assign it to the evaluation variable?  I am not a strong coder, clearly, I do not understand something.

Any help would be greatly appreciated.

 

4 REPLIES 4
-MFra-
21-Topaz II
(To:ThermoStan)

 

Hi, zero based array indexing is the default.  With one unknown only have columns 0 and 1

Capture.JPG

You have an undefined variable " n ".  You test for n>0, which fails so the Rkadapt never executes.

Annotation 2019-10-14 093117.jpg


@Fred_Kohlhepp wrote:

You have an undefined variable " n ". 


n is delivered as the first function argument.

Top Tags