检测参数中的跳转并报告其位置亲爱的JMP社区,
我正在努力寻找一种方法来检测一个代表一种产品破损的点的X坐标。
我确信可以通过脚本来完成它,但我对JMP的经验很少。
欢迎任何帮助!!
最好的祝福,
/ JM

Re:检测参数中的跳转并报告其位置在大多数情况下,JMP列名称不区分大小写,因此将其引用为“v”或“V”对代码的执行没有影响。Re:检测参数中的跳转并报告其位置非常感谢!它有很大帮助。由于我们展示了在JMP中编写脚本的方法,因此我输入代码并发现存在一些错误。我更换了“设置每个值(e-06)”来设置每个值(-6)“-log10 I-并且它完美地工作。另外,我可以问你为什么在JMP中:dtsumm:v [dtsummRow]没有产生任何错误。我会把dtsumm:V [dtsummRow],因为列的名称是大写的。再一次,你的帮助很多!/ JMRe:检测参数中的跳转并报告其位置这是一个脚本,它将进行计算以确定交叉电压
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()])
);
);
);