⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample7_6.cs

📁 用于矩阵的各种运算
💻 CS
字号:
/*
 * 示例程序Sample7_6: Integral的高振荡函数求积法
 */

using System;
using CSharpAlgorithm.Algorithm;

namespace CSharpAlgorithm.Sample
{
	class Class1
	{
        // 建立Integral的子类,在其中重载函数Func
        class Integ : Integral
        {
            public override double Func(double x)
            {
                return 0.0;
            }
        };

        [STAThread]
		static void Main(string[] args)
		{
            // 数据
            double[] s = new double[2];
            double[] fa={0.0,1.0,0.0,-3.0};
            double[] fb={6.2831852,1.0,-6.2831852,-3.0};
            double a=0.0; 
            double b=6.2831852;
            int m=30; 
            int n=4;

            // 求解
            Integ integ = new Integ();
            double value = integ.GetValuePart(a, b, m, n, fa, fb, s);

            // 显示结果
            Console.WriteLine("s[0] = " + s[0]);
            Console.WriteLine("s[1] = " + s[1]);
        }
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -