cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
katjes
Level I

reading data from peak - y and x data

Hi,

I am having JMP 18 and I am looking for a way to read the max peak - I´d like to have the max y and equivalent x value. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: reading data from peak - y and x data

Here is a simple script that will write the values to the log

names default to here(1);
dt = current data table();

theRow = (dt << get rows where(col max(:signal)==:signal))[1];
show(:"time, min"n[theRow],:signal[theRow]);
Jim
katjes
Level I

Re: reading data from peak - y and x data

hi, thanks for the great input.

 

Is there away that it does the data picking for all IDs?

txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

Recommended Articles