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

📄 sample6_3.cs

📁 用于矩阵的各种运算
💻 CS
字号:
/*
 * 示例程序Sample6_3: Interpolation类的一元三点不等距插值
 */

using System;
using CSharpAlgorithm.Algorithm;

namespace CSharpAlgorithm.Sample
{
	class Class1
	{
		[STAThread]
		static void Main(string[] args)
		{
            // 数据
            int n = 5;
            double[] x = {1.615,1.634,1.702,1.828,1.921};
            double[] y = {2.41450,2.46459,2.65271,3.03035,3.34066};
            double[] t = {1.682,1.813};
		
            // 插值运算
            for (int i=0; i<t.Length; ++i)
            {
                double yt = Interpolation.GetValueLagrange3(n, x, y, t[i]);
                Console.WriteLine("f(" + t[i] + ") = " + yt);
            }		
        }
	}
}

⌨️ 快捷键说明

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