Exemplo n.º 1
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < N - 1; i++)
            {
                _args.Add(_args[i] + _d);
            }

            BaseChartValues = new ObservableCollection<ChartValue>();
            foreach (var arg in _args)
            {
                double res = MyFunction(arg);
                _a.Add(res);
                BaseChartValues.Add(new ChartValue(arg, res));
            }
            ChartSource = new ObservableCollection<ObservableCollection<ChartValue>> {BaseChartValues};
            Chart.DataContext = ChartSource;

            TransformedChartSource = new ObservableCollection<ObservableCollection<ChartValue>>();
            DirectFourierChartValues = new ObservableCollection<ChartValue>();
            TransformedChartSource.Add(DirectFourierChartValues);
            DiscrDirectFourierChartValues = new ObservableCollection<ChartValue>();
            TransformedChartSource.Add(DiscrDirectFourierChartValues);
            TransformedChart.DataContext = TransformedChartSource;

            ReverseTransformedChartSource = new ObservableCollection<ObservableCollection<ChartValue>>();
            ReverseFourierChartValues = new ObservableCollection<ChartValue>();
            ReverseTransformedChartSource.Add(ReverseFourierChartValues);
            DiscrReverseFourierChartValues = new ObservableCollection<ChartValue>();
            ReverseTransformedChartSource.Add(DiscrReverseFourierChartValues);
            ReverseTransformedChart.DataContext = ReverseTransformedChartSource;

            _FourierTransform = new FourierTransformLib.FourierTransform(N);
        }
Exemplo n.º 2
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < N - 1; i++)
            {
                _args.Add(_args[i] + _d);
            }

            BaseChartValues = new ObservableCollection <ChartValue>();
            foreach (var arg in _args)
            {
                double res = MyFunction(arg);
                _a.Add(res);
                BaseChartValues.Add(new ChartValue(arg, res));
            }
            ChartSource = new ObservableCollection <ObservableCollection <ChartValue> > {
                BaseChartValues
            };
            Chart.DataContext = ChartSource;

            TransformedChartSource   = new ObservableCollection <ObservableCollection <ChartValue> >();
            DirectFourierChartValues = new ObservableCollection <ChartValue>();
            TransformedChartSource.Add(DirectFourierChartValues);
            DiscrDirectFourierChartValues = new ObservableCollection <ChartValue>();
            TransformedChartSource.Add(DiscrDirectFourierChartValues);
            TransformedChart.DataContext = TransformedChartSource;

            ReverseTransformedChartSource = new ObservableCollection <ObservableCollection <ChartValue> >();
            ReverseFourierChartValues     = new ObservableCollection <ChartValue>();
            ReverseTransformedChartSource.Add(ReverseFourierChartValues);
            DiscrReverseFourierChartValues = new ObservableCollection <ChartValue>();
            ReverseTransformedChartSource.Add(DiscrReverseFourierChartValues);
            ReverseTransformedChart.DataContext = ReverseTransformedChartSource;

            _FourierTransform = new FourierTransformLib.FourierTransform(N);
        }
Exemplo n.º 3
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < N - 1; i++)
            {
                _args.Add(_args[i] + _d);
            }

            BaseChartValues  = new ObservableCollection <ChartValue>();
            YBaseChartValues = new ObservableCollection <ChartValue>();
            ZBaseChartValues = new ObservableCollection <ChartValue>();

            int j = 0;

            foreach (var arg in _args)
            {
                //_myFuncResults.Add(MyFunction(arg));
                //BaseChartValues.Add(new ChartValue(arg, _myFuncResults[j]));

                _yFuncResults.Add(YFunction(arg));
                YBaseChartValues.Add(new ChartValue(arg, _yFuncResults[j]));

                _zFuncResults.Add(ZFunction(arg));
                ZBaseChartValues.Add(new ChartValue(arg, _zFuncResults[j]));

                j++;
            }

            ChartSource = new ObservableCollection <ObservableCollection <ChartValue> > {
                BaseChartValues, YBaseChartValues, ZBaseChartValues
            };
            BaseChart.DataContext = ChartSource;

            ConvolutionChartValues = new ObservableCollection <ChartValue>();
            ConvolutionChartSource = new ObservableCollection <ObservableCollection <ChartValue> >()
            {
                ConvolutionChartValues
            };
            ConvolutionChart.DataContext = ConvolutionChartSource;

            CorrelationChartValues = new ObservableCollection <ChartValue>();
            CorrelationChartSource = new ObservableCollection <ObservableCollection <ChartValue> >()
            {
                CorrelationChartValues
            };
            CorrelationChart.DataContext = CorrelationChartSource;

            _FourierTransform = new FourierTransformLib.FourierTransform(N);
        }
Exemplo n.º 4
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < N - 1; i++)
            {
                _args.Add(_args[i] + _d);
            }

            BaseChartValues = new ObservableCollection<ChartValue>();
            YBaseChartValues = new ObservableCollection<ChartValue>();
            ZBaseChartValues = new ObservableCollection<ChartValue>();

            int j = 0;
            foreach (var arg in _args)
            {
                //_myFuncResults.Add(MyFunction(arg));
                //BaseChartValues.Add(new ChartValue(arg, _myFuncResults[j]));

                _yFuncResults.Add(YFunction(arg));
                YBaseChartValues.Add(new ChartValue(arg, _yFuncResults[j]));

                _zFuncResults.Add(ZFunction(arg));
                ZBaseChartValues.Add(new ChartValue(arg, _zFuncResults[j]));
                
                j++;
            }

            ChartSource = new ObservableCollection<ObservableCollection<ChartValue>> {BaseChartValues, YBaseChartValues, ZBaseChartValues};
            BaseChart.DataContext = ChartSource;

            ConvolutionChartValues = new ObservableCollection<ChartValue>();
            ConvolutionChartSource = new ObservableCollection<ObservableCollection<ChartValue>>() { ConvolutionChartValues };
            ConvolutionChart.DataContext = ConvolutionChartSource;

            CorrelationChartValues = new ObservableCollection<ChartValue>();
            CorrelationChartSource = new ObservableCollection<ObservableCollection<ChartValue>>() { CorrelationChartValues };
            CorrelationChart.DataContext = CorrelationChartSource;

            _FourierTransform = new FourierTransformLib.FourierTransform(N);
        }