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

The following code will load data from file and create EWMA chart with r=0.25 and significance 95%:

uses MtxExpr, Math387, StatControlCharts, MtxVecTee, StatSeries;
procedure Example;
var CL: double;
  UCL, LCL, DrawVec: Vector;
  Data: Matrix
  Confidence: double;
begin
  Data.LoadFromFile('ewma_data.mtx');
  EWMAChart(Data,DrawVec,CL,UCL,LCL,0.25,0.95);
  DrawValues(DrawVec,Series1);
  // Series2 and Series3 are line series used for displaying control limits
  DrawValues(UCL,Series2);
  DrawValues(LCL,Series3);
end;
#include "MtxExpr.hpp"
#include "Math387.hpp"
#include "StatControlCharts.hpp"
#include "MtxVecTee.hpp"
#include "StatSeries.hpp"
void __fastcall  Example(TLineSeries* Series1, TLineSeries* Series2,
  TLineSeries* Series3)
{
  sVector ucl,lcl,drawvec;
  sMatrix data;
  double cl;

  data.LoadFromFile("ewma_data.mtx");
  EWMAChart(data,drawvec,cl,ucl,lcl,0.25,0.95);
  DrawValues(drawvec,Series1,0,1,false);
  // Series2 and Series3 are used for displaying control limits.
  DrawValues(lcl,Series2,0,1,false);
  DrawValues(ucl,Series3,0,1,false);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.