Subscribe Bookmark RSS Feed

Select a range of rows with variables

natalie_

Community Trekker

Joined:

Jan 6, 2016

Hi everyone,

Is it possible to select a range of rows with variables?

This is what I have, but it found the maximum over the entire range:

vlower = lowerVoltage << get;

  vupper = upperVoltage << get;

  row1 = (vlower/10)+1;

  row2=(vupper/10)+1;

select_rows = row1::row2(dt2);          

select_values = dt2:Idoff(select_rows);

id = maximum(select_values);



2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Natalie,

If I understand what you are asking for, I believe the jsl you want would be:

vlower = lowerVoltage << get;

  vupper = upperVoltage << get;

  row1 = (vlower/10)+1;

  row2=(vupper/10)+1;

select_rows = row1:row2;

id = maximum(dt2:Idoff[select_rows]);

dt<<select rows(select_rows);

Jim
natalie_

Community Trekker

Joined:

Jan 6, 2016

Thank you, so simple!   Thank you for helping me with more JSL syntax!