Esempio n. 1
0
        private void CosineFuntionCalculate()
        {
            if (FrequencyNeedsToRecalculate)
            {
                if (CosineOscillation == null)
                {
                    CosineOscillation = new List <double>();
                }

                CosineOscillation.Clear();

                //DateTime time = DateTime.Now;

                //Access Time Data from TimeData Project
                foreach (double item in TimeIntervals)
                {
                    double frequency = Math.Cos(2 * Math.PI * ExcitationFrequencyHz * item);
                    double w         = Math.Round(frequency, 6);

                    CosineOscillation.Add(w);
                }


                //_tCosinTerm = (DateTime.Now - time).TotalMilliseconds;


                FrequencyNeedsToRecalculate = false;

                ForceNeedsToRecalculate = true;
            }
        }
Esempio n. 2
0
        private void CosineCalculate()
        {
            if (FrequencyNeedsToRecalculate)
            {
                if (CosineOscillation == null)
                {
                    CosineOscillation = new List <double>();
                }

                CosineOscillation.Clear();


                //Access Time Data from TimeData Project
                foreach (double item in TimeIntervals)
                {
                    double frequency = Math.Cos(2 * Math.PI * ExcitationFrequencyHz * item);
                    double w         = Math.Round(frequency, 6);

                    CosineOscillation.Add(w);
                }

                FrequencyNeedsToRecalculate = false;

                ForceNeedsToRecalculate = true;
            }
        }