Average the first 100 rows and the last 100 rows of a JMP column.I have a noisy curve where I need to take average of the extremes and compare to the minimum value. Thought this would work but doesn't.
Col Mean( :Column_Name W[Index( 1, 100 )] ) + <SPAN>Col Mean( :Column_Name[N Rows() - 99 :: N Rows()] )</SPAN><CODE class="language-jsl"> / 2
Automation and ScriptingRe: Average the first 100 rows and the last 100 rows of a JMP column.Here is one way of handling the issue
Names Default To Here( 1 );
dt =
// Open Data Table: Semiconductor Capability.jmp
// → Data Table( "Semiconductor Capability" )
Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
column_name = "NPN1";
Col Mean( If( Row() <= 100, Column( column_name ), . ) ) + Col Mean(
If( Row() >= N Rows() - 99,
Column( column_name ),
.
)
) / 2;
// I think this is a better formula to calculate the mean of the extremes
Col Mean( If( Row() <= 100 | Row() >= N Rows() - 99, Column( column_name ), . ) );
Re: Average the first 100 rows and the last 100 rows of a JMP column.Try this
(Mean( :Z[Index( 1, 100 )] ) + Mean( :Z[Index( N Rows() - 99, N Rows() )] )) / 2
Re: Average the first 100 rows and the last 100 rows of a JMP column.I used "Z" as the column name.