도움말 가이드에서 찾아 보았는데 올바르게 적용하는 것 같지만 작동하지 않는 것 같습니다. 누군가 내가 뭔가 빠졌는지 확인해 주시겠습니까?
다른 열에서 만들고 값을 반올림 한 열이 있습니다. 새 열의 값을 기반으로 행 범위 만 유지하면됩니다. 50000에서 50999 사이의 New Y 값만 유지하고 나머지 행은 삭제하고 싶습니다.
다음은이 명령이있는 스크립트의 일부이지만 작동하지 않습니다. 작업중인 현재 작업 이전에 주석 처리 된 줄을 볼 수 있지만 이제는 유지해야하는 50000 범위의 다른 값이있을 수 있습니다.
필요한 경우 참조로 전체 스크립트를 첨부했습니다.
dt = Current Data Table();
Column( dt, "X coordinate" ) << data type( Numeric ) << Modeling Type( Continuous ) << Format( Best, 12 );
dt << New Column( "New Y", Numeric, Nominal, Width( 5 ), Formula( Round( Y coordinate ) ) );
//dt << select where( :New Y != 50503 );
dt << select where( :New Y < 50000 & :New Y > 50999 );
dt << delete rows;
dt << New Column( "Normalized", Numeric, Continuous, Width( 10 ), Precision( 7 ), Formula( IntenCD / Col Max( IntenCD ) ) );
이에 대한 도움에 미리 감사드립니다.
Clear Symbols();
Names Default To Here( 1 );
framex_value = "";
lotid_value = "";
w = New Window( "Requested Information", // opens a window with a title and this content...
<<RETURN result=""> 50999 );
dt << delete rows;
dt << New Column( "Normalized", Numeric, Continuous, Width( 10 ), Precision( 7 ), Formula( IntenCD / Col Max( IntenCD ) ) );
// Determine Matrix
xMat = Matrix( 76200 - (framex_value / 2) ) |/ Matrix( 76200 - (framex_value / 2) ) |/ Matrix( 76200 + (framex_value / 2) ) |/
Matrix( 76200 + (framex_value / 2) );
// The yMat is static
yMat = [1, 0.92, 0.92, 1];
// The overall delta
overallDelta = Col Max( dt:Normalized ) - Col Min( dt:Normalized );
//The delta between the lines
withinOrangeDelta = Col Max(
If( dt:X coordinate > (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)),
dt:Normalized,
.
)
) - Col Max( dt:Normalized ) - Col Min( dt:Normalized ) + 1;
Col Min( If( dt:X coordinate > (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)), dt:Normalized, . ) );
// Graph Builer and Delta display
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( dt:X Coordinate ), Y( dt:Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
Text( Boxed, {75000, .94}, "Overall Delta = " || Char( Format( overallDelta, 7, 4 ) ) );
Text( Boxed, {75000, .93}, "Within Frame Delta = " || Char( Format( withinOrangeDelta, 7, 4 ) ) );
);
Report( gb )[AxisBox( 2 )] << Min( .91 );
Report( gb )<<SAVE picture=""></SAVE></RETURN>
논리적 인 문제라고 생각합니다.
select where 문 :
dt << select where( :New Y < 50000 & :New Y > 50999 );
: New Y는 50000보다 작을 수 없습니다. 과 동시에 50999보다 큽니다.
대신 다음을 원합니다.
dt << select where( 50000 <= :New Y <= 50999 );
오, 고마워. 말이 되네요. 내 코드를 새 줄로 바꿨지 만 삭제해야하는 다른 모든 행은 실제로 삭제되지 않으므로 50000에서 50999 사이의 새 Y 값만 그래프로 표시합니다. 내가 또 무엇을 놓칠 수 있습니까?
예, 여기 내 데이터 세트 중 하나가 있습니다. 도움을 주셔서 감사합니다!
안녕하세요, 특정 범위의 Y 좌표를 제외하고 모두 삭제하는 방법을 여전히 알 수 없습니다. 이전 도움말의 업데이트로 이것은 내가 작업중인 섹션의 새 스크립트입니다. 따라서 50000에서 50999 사이의 Y 값만 유지하고 나머지는 삭제해야합니다.
dt = Current Data Table();
Column( dt, "X coordinate" ) << data type( Numeric ) << Modeling Type( Continuous ) << Format( Best, 12 );
dt << New Column( "New Y", Numeric, Continuous, Width( 10 ), Formula( Round( Y coordinate, 0 ) ) );
//dt << select where( :New Y != 50503 );
dt << select where( 50000 <= :New Y <= 50999 );
dt << delete rows;
dt << New Column( "Normalized",
Numeric,
Continuous,
Width( 10 ),
Precision( 7 ),
Formula( IntenCD / Col Max( IntenCD ) )
);