Low Pass filter

Discussion in 'Programmer's Corner' started by gary1wang, Oct 25, 2011.

  1. gary1wang

    Thread Starter Member

    Sep 18, 2008
    Hi guys, i have simple low pass filter program, i do not know what "double µ = t / (t + constant);" mean here

    double µ = t / (t + constant);

    double input[10000];
    double output[10000];

    double output[0] = input[0];
    while(for t=1; t<10000])
    output[t] = µ * (input[t] - output[t-1]) + output[t-1];

  2. PNeil

    New Member

    Oct 27, 2010
    Is this written in C, C++, C# (Sharp) or Java? I am a C/C++ programmer so I am not familiar with that u looking type of symbol. In normal C/C++ syntax, t and constant would have to be a variable declared elsewhere (not shown) in the program.

    If so, that line would read. Declare a variable name u and assign the value of the expression... t / (t + constant) to it.

    t here probably mean time constant. (RxC) not sure why it is written like that in the program.

    I have written filter programs for Windows CE, using Visual C++/MFC. It calculates impedance, phase angle, cutoff frequency, XC, XL, AV (gain), and time constant, and I never have to structure my program like that.
    Last edited: Oct 27, 2011