You are here: Symbol Reference > StatControlCharts Namespace > Functions > StatControlCharts.QCWestgardRules Function
Stats Master VCL
ContentsIndex
Example

>Load process data, then check if any points are out-of-control.

Uses MtxExpr, StatControlCharts;
procedure Example;
var data, outofcontrol,indexes: Vector;
begin
  data.LoadFromFile('process_data.vec');
  QCWestgardRules(data,outofcontrol,data.mean,data.stddev);
  // Now find indexes of out-of-control points
  indexes.FindIndexes(outofcontrol,'>',0);
  // indexes.IValues now stores the indices of out-of-control points
end;
#include "MtxExpr.hpp"
#include "MtxExprInt.hpp"
#include "StatControlCharts.hpp"
void __fastcall Example()
{
      sVector data, outofcontrol;
    VectorInt indexes;

    data.LoadFromFile("process_data.vec");
    QCWestgardRules(data,outofcontrol,data.Mean(),data.StdDev());
    // Now find indexes of out-of-control points
      indexes.FindIndexes(outofcontrol,">",0.0);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.