Detectar un salto en un parámetro e informar dónde estáEstimada comunidad de JMP,
Estoy luchando para encontrar una manera de detectar la coordenada X de un punto que representa la ruptura de un producto.
Estoy seguro de que es posible hacerlo mediante scripts pero tengo muy poca experiencia con JMP.
Cualquier ayuda es bienvenida !!
Atentamente,
/ JM

Re: Detectar un salto en un parámetro e informar dónde estáLos nombres de las columnas JMP no distinguen entre mayúsculas y minúsculas ...... en la mayoría de los casos, por lo que hacer referencia a "v" o "V" no tiene ningún impacto en la ejecución del código.Re: Detectar un salto en un parámetro e informar dónde está¡Muchas gracias! Esto ayuda mucho. Ya que mostramos la forma de escribir en JMP, ingresé el código y descubrí que había un pequeño error. Reemplacé "establecer cada valor (e-06)" para establecer cada valor (-6) "-log10 I- y funciona perfectamente. También, puedo preguntarle por qué en JMP: dtsumm: v [dtsummRow] no está generando ningún error. Habría puesto dtsumm: V [dtsummRow] ya que el nombre de la columna está en mayúsculas. Una vez más, muchas gracias por tu ayuda! / JMRe: Detectar un salto en un parámetro e informar dónde estáAquí hay un script que hará los cálculos para determinar el voltaje cruzado
Names Default To Here( 1 );
dt = Current Data Table();
// Create a summary table to hold the new information
dtsumm = dt << Summary( Group( :batch, :Samples ID ), Freq( "None" ), Weight( "None" ) );
// Add a new column to hold the calculated value for the Voltage value when the data crosses
// crosses the target value
dtsumm << New Column( "V" );
// Create a new column that has the target value
dtsumm << New Column( "Log10 I", set each value( e-06 ) );
// Set the active data table back to the original data table
Current Data Table( dt );
// Loop across the active data table and calculate the voltage when the Y variable crosses the
// target value
For Each Row(
currow = Row();
curbatch = dt:batch[Row()];
cursampleID = :Samples ID[Row()];
// Get the row in the output table that matches the Batch value and Samples ID
// value for the row in the main table the looping is working on
dtsummRow = (dtsumm << get rows where( dtsumm:batch == curbatch & dtsumm:Samples ID == cursampleID ))[1];
// Don't process the data if the crossing point has been previously found
If( Is Missing( dtsumm:v[dtsummRow] ),
// Find all of the matching rows above the current looping row
Highrows = dt << get rows where( dt:batch == curbatch & dt:Samples ID == cursampleID & Row() > currow );
// If the target value lies between the current rows Y value and the next matching rows Y value then
// determine the crossing voltage value by doing an interprelation of the voltage values of the current row
// and the next matching rows value.
If( dt:Name( "Log10 I [A]" )[Row()] <= dtsumm:Log10 I[dtsummRow] & dt:Name( "Log10 I [A]" )[Min( Highrows )] > dtsumm:Log10 I[dtsummRow],
dtsumm:V[dtsummRow] = dt:V[Row()] + (dt:V[Min( Highrows )] - dt:V[Row()]) * (dtsumm:Log10 I[dtsummRow] - dt:Name( "Log10 I [A]" )[Row()])
/ (dt:Name( "Log10 I [A]" )[Min( Highrows )] - dt:Name( "Log10 I [A]" )[Row()])
);
);
);