• 大小: 568KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-22
  • 语言: C#
  • 标签: C#  非线性  

资源简介

计算方法常用算法,牛顿迭代法求解方程组,可以输入线性或非线性方程组,IDE为VS2010,.NET搭建用户界面,报错功能完善。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NewtonIteration
{
    /// 
    /// 方程组编辑窗口
    /// by Ted
    /// 2013.6
    /// 

    public partial class EditForm : Form
    {
        #region 字段
        private int UnknowNum; //未知数的个数
        private int EquationNum; //方程的个数
        private NonlinearEquations Equations; //非线性方程组
        public static int ExampleIndex; //示例
        #endregion

        #region 方法

        /// 
        /// 构造函数
        /// 

        public EditForm()
        {
            InitializeComponent();

            #region 初始化窗体

            this.labelEquation = new System.Windows.Forms.Label[7]; //提示符
            this.textCoefficient = new System.Windows.Forms.TextBox[7 8]; //系数
            this.labelX = new System.Windows.Forms.Label[7 7]; //未知数
            this.comboIndex = new System.Windows.Forms.ComboBox[7 7]; // 指数
            this.labelAdd = new System.Windows.Forms.Label[7 6]; //加号
            this.labelZero = new System.Windows.Forms.Label[7]; //等于号
            for (int i = 0; i < 7; i++)
            {
                this.labelEquation[i] = new System.Windows.Forms.Label();
                for (int j = 0; j < 7; j++)
                {
                    this.textCoefficient[i j] = new System.Windows.Forms.TextBox();
                    this.labelX[i j] = new System.Windows.Forms.Label();
                    this.comboIndex[i j] = new System.Windows.Forms.ComboBox();
                    if (j < 6)
                    {
                        this.labelAdd[i j] = new System.Windows.Forms.Label();
                    }
                }
                this.textCoefficient[i 7] = new System.Windows.Forms.TextBox();
                this.labelZero[i] = new System.Windows.Forms.Label();
            }

            this.groupBox.Controls.AddRange(this.labelEquation);
            for (int i = 0; i < 7; i++)
            {
                for (int j = 0; j < 7; j++)
                {
                    this.groupBox.Controls.Add(this.textCoefficient[i j]);
                    this.groupBox.Controls.Add(this.labelX[i j]);
                    this.groupBox.Controls.Add(this.comboIndex[i j]);
                    if (j < 6)
                    {
                        this.groupBox.Controls.Add(this.labelAdd[i j]);
                    }
                }
                this.groupBox.Controls.Add(this.textCoefficient[i 7]);
            }
            this.groupBox.Controls.AddRange(this.labelZero);

            // 
            // by_Ted:Tab from 13 to 218
            // 
            int TabIndex = 13;
            for (int i = 0; i < 7; i++)
            {
                // 
                // labelEquation
                // 
                this

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-06-07 11:18  NewtonIteration\
     文件         887  2013-06-03 09:26  NewtonIteration.sln
     目录           0  2013-06-03 09:31  NewtonIteration\bin\
     目录           0  2013-06-13 22:38  NewtonIteration\bin\Debug\
     文件       59392  2014-01-17 16:13  NewtonIteration\bin\Debug\NewtonIteration.exe
     文件       95744  2014-01-17 16:13  NewtonIteration\bin\Debug\NewtonIteration.pdb
     文件       11600  2014-01-17 16:13  NewtonIteration\bin\Debug\NewtonIteration.vshost.exe
     文件         490  2012-06-06 02:06  NewtonIteration\bin\Debug\NewtonIteration.vshost.exe.manifest
     目录           0  2013-06-03 09:31  NewtonIteration\bin\Release\
     文件       30658  2014-01-17 16:13  NewtonIteration\EditForm.cs
     文件       11502  2013-06-15 05:39  NewtonIteration\EditForm.Designer.cs
     文件        5817  2013-06-13 11:29  NewtonIteration\EditForm.resx
     文件        1208  2014-01-17 16:13  NewtonIteration\ExampleForm.cs
     文件        4280  2013-06-15 05:28  NewtonIteration\ExampleForm.Designer.cs
     文件        5817  2013-06-15 05:28  NewtonIteration\ExampleForm.resx
     目录           0  2013-06-15 05:16  NewtonIteration\images\
     文件         129  2013-06-03 11:07  NewtonIteration\images\add.png
     文件         984  2013-06-03 14:35  NewtonIteration\images\add_gray.png
     文件        2057  2013-06-07 14:41  NewtonIteration\images\Equation1.png
     文件        2491  2013-06-15 05:19  NewtonIteration\images\Equation2.png
     文件        2128  2013-06-13 15:55  NewtonIteration\images\Equation3.png
     文件         114  2013-06-03 11:07  NewtonIteration\images\remove.png
     文件         973  2013-06-03 14:35  NewtonIteration\images\remove_gray.png
     文件        5486  2013-06-15 05:17  NewtonIteration\NewtonIteration.csproj
     文件       15286  2014-01-17 16:12  NewtonIteration\NewtonMethod.cs
     文件        4744  2014-01-17 16:12  NewtonIteration\NonlinearEquation.cs
     文件        3360  2014-01-17 16:12  NewtonIteration\NonlinearEquations.cs
     目录           0  2013-06-03 09:26  NewtonIteration\obj\
     目录           0  2013-06-03 09:26  NewtonIteration\obj\x86\
     目录           0  2014-01-17 16:13  NewtonIteration\obj\x86\Debug\
     文件        2867  2014-01-17 16:09  NewtonIteration\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
............此处省略26个文件信息

评论

共有 条评论