BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted

JMP11 - Subscript Not Working

Hi,

I am trying to create a group of columns that will represent the propagation of ramp function.  To do this, I am using the below formulas.  Although the formula syntax seems correct, the formula is not working for rows before 665.  Any suggestions, or workarounds?  I have commented the suspected error.  I am using JMP11.

Thanks!

// Propagating Ramp Functions:

dt = New Table( "Formulas Not Working",

Add Rows( 25000 ),

New Column( "RAMP 01",

Numeric,

Continuous,

Formula( If( Row() < 601, 0, If( Row() < 4441, Lag( :RAMP 01, 1 ) + 1 / 3840, If( Row() < 5001, 1, Lag( :RAMP 01, 5000 ) ) ) ) )

),

New Column( "RAMP 02",

Numeric,

Continuous,

Formula(

If(

Row() < 601, :RAMP 02[601, Empty()],

Row() == 601, :RAMP 02[4377, Empty()], // I suspect this subscript function is not working, although syntax is correct and Row(4377) has values.  Any ideas?

Row() < 665, Lag( :RAMP 02, 1 ) + 1 / 3840,

Row() < 4441, Lag( :RAMP 01, 64 ),

Row() < 5001, :RAMP 02[4440, Empty()],

Lag( :RAMP 02, 5000 )

)

)

),

New Column( "RAMP 03",

Numeric,

Continuous,

Formula(

If(

Row() < 601, :RAMP 03[601, Empty()],

Row() == 601, :RAMP 03[4377, Empty()],

Row() < 665, Lag( :RAMP 03, 1 ) + 1 / 3840,

Row() < 4441, Lag( :RAMP 02, 64 ),

Row() < 5001, :RAMP 03[4440, Empty()],

Lag( :RAMP 03, 5000 )

)

)

),

New Column( "RAMP 04",

Numeric,

Continuous,

Formula(

If(

Row() < 601, :RAMP 04[601, Empty()],

Row() == 601, :RAMP 04[4377, Empty()],

Row() < 665, Lag( :RAMP 04, 1 ) + 1 / 3840,

Row() < 4441, Lag( :RAMP 03, 64 ),

Row() < 5001, :RAMP 04[4440, Empty()],

Lag( :RAMP 04, 5000 )

)

)

),

New Column( "RAMP 05",

Numeric,

Continuous,

Formula(

If(

Row() < 601, :RAMP 05[601, Empty()],

Row() == 601, :RAMP 05[4377, Empty()],

Row() < 665, Lag( :RAMP 05, 1 ) + 1 / 3840,

Row() < 4441, Lag( :RAMP 04, 64 ),

Row() < 5001, :RAMP 05[4440, Empty()],

Lag( :RAMP 05, 5000 )

)

)

),

New Column( "RAMP 06",

Numeric,

Continuous,

Formula(

If(

Row() < 601, :RAMP 06[601, Empty()],

Row() == 601, :RAMP 06[4377, Empty()],

Row() < 665, Lag( :RAMP 06, 1 ) + 1 / 3840,

Row() < 4441, Lag( :RAMP 05, 64 ),

Row() < 5001, :RAMP 06[4440, Empty()],

Lag( :RAMP 06, 5000 )

)

)

)

);

2 REPLIES 2

Re: JMP11 - Subscript Not Working

It seems like JMP evaluates the formulas in row-order and at first evaluation of e.g. row 601 there are not (yet) any values in cells in row 602 and beyond.

Rerunning of formulas should do it:

Wait(1); // let the first evaluation finish!

dt<<rerun formulas;

Re: JMP11 - Subscript Not Working

Hi MS,

Thanks for the help.  I was not able to get the function to work from scripting alone.  I eventually got the formula to work by editing the annotated row to reference another column, and then changing it back.  It worked after that.