You are here: Symbol Reference > Dew.Stats Namespace > StatControlCharts Class > StatControlCharts Methods > EWMAChart Method > EWMAChart Method (TMtx, TVec, TSample, TVec, TVec, TSample, TSample)
Dew Stats for .NET
Contents
C# Example

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

using Dew.Math;
using Dew.Math.Units;
using Dew.Stats.Units;
namespace Dew.Examples
{
  private void Example(Steema.TeeChart.Styles.Line Series1, Steema.TeeChart.Styles.Line Series2,
    Steema.TeeChart.Styles.Line Series3)
  {
    Matrix data = new Matrix(0,0);
    Vector lcl = new Vector(0);
    Vector ucl = new Vector(0);
    double cl;
    data.LoadFromFile("ewma_data.vec");
    StatControlCharts.EWMAChart(data,drawvec,out cl,ucl,lcl,0.25,0.95);
    MtxVecTee.DrawValues(drawvec,Series1,0,1,false);
    // Series2 and Series3 are used for displaying control limits.
    MtxVecTee.DrawValues(lcl,Series2,0,1,false);
    MtxVecTee.DrawValues(ucl,Series3,0,1,false);
  }
}
Copyright (c) 1999-2010 by Dew Research. All rights reserved.