안녕하세요,
나는 아직도 초보자이며, 나는이 문제로 발전 할 수 있기를 희망한다!
나는 "median_range_mm", "median_range_mm 2", "median_range_mm 3"이라는 반복 열을 가지고 있습니다.
그리고 "target_status", "target_status_2".....과 관련된 열
나는 모든 중앙값 범위 1, 2, 3으로 연속 분포를 계획하고 싶다. 같은 창에서. 하지만 타겟 상태가 5가 아닌 중간 범위에서 모든 셀을 필터링하려고합니다.
나는 분명하다. 이 코드는, 루프의 대상 상태에 대한 필터 조건을 "for"로 작성하는 방법을 모르겠습니다.
dt = Current Data Table();
/renaming columns<BR />For( i = 1, i <= 716, i++,<BR /> For( j = 0, j <= 65, j++,<BR /> If(<BR /> i == 1, Column( i ) << set name( "EVENT_BEGIN_OF_CAPTURE" ),<BR /> i == 10, Column( i ) << set name( "Temperature" ),<BR /> i == 16 + 11 * j, Column( i ) << set name( "target_status" ),<BR /> i == 17 + 11 * j, Column( i ) << set name( "median_range_mm" ),<BR /> )<BR /> )<BR />)<BR /><BR />
// for the first ranging column
valMax = Max( :Temperature[dt << get rows where( :target_status == 5 )] ); //max selection
For( d = 3, d <= N Rows( dt ), d++,
val1 = Column( "Temperature" )[d];
val2 = Column( "Temperature" )[d + 1];
dt << select where( val2 - val1 <= 0.1 * valMax ); //stability
);
// plot of the first ranging
New Window( "Only plot median range with a stable temperature",
H List Box(
Distribution(
Uniform Scaling( 1 ),
Continuous Distribution(
Column( :median_range_mm ),
Show Percents( 1 ),
Show Counts( 1 ),
Customize Summary Statistics( Minimum( 1 ), Maximum( 1 ), Median( 1 ), Set Alpha Level( 0.05 ) ),
/* it is the first column so I can write : "target_status" to call the column */ <BR /><FONT face="arial black,avant garde" color="#FF9900"><STRONG> Local Data Filter( Add Filter( columns( :target_status ), Where( :target_status == 5 ) ) );</STRONG></FONT>
)
);
<BR />// looking for the first max value of the ranging
maxValue = Max( :median_range_mm[dt << get rows where( :target_status == 5 )] );
minValue = Min( :median_range_mm[dt << get rows where( :target_status == 5 )] );
// Then look on the others columns
For( p = 2, p <= 64, p++,
nom = "median_range_mm " || Char( p ); // look at ranging median_range_mm 1, 2, 3 ...
col = Column( nom );
name = "target_status " || Char( p ); // look at target status associated
tgt = Column( name );
//dt << get rows where( Column( name ) == 5); // doesn't work
<STRONG> maxValueVar = Max( Column( nom )[dt << get rows where( Column( name ) == 5 )] );
minValueVar = Min( Column( nom )[dt << get rows where( Column( name ) == 5 )] );</STRONG>
If(
maxValueVar > maxValue, maxValue = maxValueVar,
minValueVar < minValue, minValue = minValueVar
);
);
For( g = 2, g <= 64, g++,
nom = "median_range_mm " || Char( g );
col = Column( nom );<BR /> /* there is difficutie*/<BR /><FONT face="arial black,avant garde" color="#FF9900"><STRONG> name = "target_status " || Char( g );
tgt = Column( name );</STRONG></FONT>
valueMax = Max( :Temperature );
For( h = 3, h <= N Rows( dt ), h++,
value1 = Column( "Temperature" )[h];
value2 = Column( "Temperature" )[h + 1];
dt << select where( value2 - value1 <= 0.1 * valueMax ); // this is for a plot with a stable temperature
);
Distribution(
Uniform Scaling( 1 ),
Continuous Distribution(
Column( col ),
Show Percents( 1 ),
Show Counts( 1 ),
Customize Summary Statistics( Minimum( 1 ), Maximum( 1 ), Median( 1 ), Set Alpha Level( 0.05 ) ),<BR /> /* there is the difficultie*/<BR /> /* I don't want to call all the columns " target_status 2 , 3 , 4 .... */ <BR /><FONT face="arial black,avant garde" color="#FF9900"><STRONG> Local Data Filter(
Add Filter( columns( Column( tgt ), Where( Column( tgt ) == 5 ) ) );</STRONG></FONT>
)
)
);
);
)
);
건배
몇 가지 일반적인 아이디어 ...
첫째, 데이터 필터는 행 상태의 대화 형 조작이 요구 될 때 멋진 장치라고 생각합니다. 귀하의 경우에는 행 상태가 명시 적 루프 대신 제어되므로 스크립트가 아닌 행 상태를 직접 조작하는 것으로 보입니다.
둘째, 데이터 테이블 메시지 << Select Where (Boolean)에 대한 인수로 부울 식을 사용할 수 있습니다. << Exclude 메시지와 함께이 메시지를 따르십시오. 행 상태는 플랫폼 (예 : Distribution)이 이러한 관측치를 포함하지 않을 것임을 판별합니다.
셋째, 플랫폼 시작 메시지에는이 문제에서 사용할 수있는 Where (부울) 인수가 포함될 수 있습니다.
마지막으로, New Window () 함수 내부의 두 루프의 목적에 대해 확신하지 못합니다. 아마도 그것들을 functfion 외부로 옮기고 Append () 메시지를 사용하여 더 많은 플랫폼을 창에 추가하는 것이 가장 좋습니다.