没有合适的资源?快使用搜索试试~ 我知道了~
灵敏度分析C#程序代码.docx
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 163 浏览量
2023-04-10
19:21:58
上传
评论
收藏 44KB DOCX 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/87673244/0001-273712fdabc21df6342674e4cc99ddaa_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
12页
。
资源推荐
资源详情
资源评论
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![](https://csdnimg.cn/release/download_crawler_static/87673244/bg1.jpg)
..
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 灵敏度分析尝试
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public bool jiansuo(double x, double[] y)
{
bool cunzai = false; ;
for (int i = 0; i < y.Length; i++)
if (y[i] == x)
cunzai = true;
return cunzai;
}
public double qiumax(List<double > array)
{
double max=-9999;
for (int i = 0; i <array.Count; i++)
{
if (array[i] > max)
max = array[i];
}
return max;
}
public double qiumin(List<double> array)
{
double min = 9999;
for (int i = 0; i <array.Count; i++)
{
if (array[i] < min)
..
.
![](https://csdnimg.cn/release/download_crawler_static/87673244/bg2.jpg)
..
min= array[i];
return min;
}
}
private void button1建立表格_Click(object sender, EventArgs e)
{
if (dataGridView1.Columns.Count > 0 ||
dataGridView2.Columns.Count > 0 || dataGridView3.Columns.Count > 0 ||
dataGridView4.Columns.Count > 0 || dataGridView5.Columns.Count > 0)
{
dataGridView1.Columns.Clear();
dataGridView2.Columns.Clear();
dataGridView3.Columns.Clear();
dataGridView4.Columns.Clear();
dataGridView5.Columns.Clear();
}
if (dataGridView1.Rows.Count > 0 || dataGridView2.Rows.Count >
0 || dataGridView4.Rows.Count > 0 || dataGridView5.Rows.Count > 0)
{
dataGridView1.Rows.Clear();
dataGridView2.Rows.Clear();
dataGridView3.Rows.Clear();
dataGridView4.Rows.Clear();
dataGridView2.Rows.Clear();
}
int m, n;
m = int.Parse(textBox1production.Text);//m=3
n = int.Parse(textBox2resource.Text);//n=3
for (int i = 1; i <= m + n; i++)
{
dataGridView5.Columns.Add(" ", "C" + i.ToString());
}
for (int i = 1; i <= m + n; i++)
{
dataGridView4.Columns.Add("", "X" + i.ToString());
}
dataGridView4.Rows.Add(n + 1);
dataGridView3.Columns.Add(" ", "C");
dataGridView1.Columns.Add("", "Cb");
..
.
![](https://csdnimg.cn/release/download_crawler_static/87673244/bg3.jpg)
..
dataGridView1.Columns.Add("", "Xb(下标)");
dataGridView1.Columns.Add("", "B-1b");
dataGridView1.Rows.Add(n);
dataGridView2.Columns.Add(" ", "C");
dataGridView2.Rows.Add(1);
}
private void splitContainer3_SplitterMoved(object sender,
SplitterEventArgs e)
{
}
private void splitContainer6_Panel2_Paint(object sender,
PaintEventArgs e)
{
}
private void button1产品_Click(object sender, EventArgs e)
{
double[] Xb = new double[dataGridView1.Rows.Count];//用于存放
Xb的下标;
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (dataGridView1.Rows[i].Cells[1].Value != null)
Xb[i] =
double.Parse(dataGridView1.Rows[i].Cells[1].Value.ToString());
}
double[,] A = new double[dataGridView4.Rows.Count,
dataGridView4.Columns.Count];//A矩阵存放后面的
for (int i = 0; i < dataGridView4.Rows.Count; i++)
for (int j = 0; j < dataGridView4.Columns.Count; j++)
{
if (dataGridView4.Rows[i].Cells[j].Value != null)
A[i, j] =
double.Parse(dataGridView4.Rows[i].Cells[j].Value.ToString());
}
int pro=0;
if (textBox3输入产品.Text!="")
pro = int.Parse(textBox3输入产品.Text);
if (pro <= 0 || pro >
..
.
剩余11页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/5727ece9c0874d7a8520d85db0052815_weixin_67271870.jpg!1)
若♡
- 粉丝: 6208
- 资源: 1万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)