亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

講解.NET環(huán)境下繪制模糊數(shù)學(xué)中隸屬函數(shù)分布圖第1/5頁

 更新時(shí)間:2007年11月23日 17:13:15   作者:  
 繪制模糊數(shù)學(xué)中隸屬函數(shù)分布圖
  using System; 
  using System.Collections.Generic; 
  using System.ComponentModel; 
  using System.Data; 
  using System.Drawing; 
  using System.Text; 
  using System.Collections; 
  using System.Windows.Forms; 
  using System.Drawing.Imaging; 
  using System.Drawing.Drawing2D; 
  namespace ImageFuzzy 
  ...{ 
  public partial class Form1 : Form 
  ...{ 
  private int type1; 
  private int type2; 

  private string item1; 
  private string item2; 
  private float a; 
  private float b; 
  private float c; 
  private float d1; 
  private float k; 
  private float l; 
  private float tempx; 
  private float tempy; 
  public void InitArray() 
  ...{ 
  type1 = 0; 
  type2 = 0; 
  k = 2; 
  item1 = this.comboBox1.Text.ToString(); 
  item2 = this.comboBox2.Text.ToString(); 
  this.groupBox1.Text = item1 + item2 + "圖形"; 
  a = float.Parse(this.tbA.Text.Trim().ToString()); 
  b = float.Parse(this.tbB.Text.Trim().ToString()); 
  c = float.Parse(this.tbC.Text.Trim().ToString()); 
  d1 = float.Parse(this.tbD.Text.Trim().ToString()); 
  k = float.Parse(this.tbK.Text.Trim().ToString()); 
  l = float.Parse(this.tbL.Text.Trim().ToString()); 
  type1 = this.comboBox1.SelectedIndex+1; 
  type2 = this.comboBox2.SelectedIndex+1; 
  } 
  private void delete() 
  ...{ 
  a = 0; 
  b = 0; 
  c = 0; 
  d1 = 0; 
  k = 0; 
  l = 0; 
  } 
  private void set1() 
  ...{ 
  this.tbA.Text = "1"; 
  this.tbB.Text = "2"; 
  this.tbC.Text = "3"; 
  this.tbD.Text = "4"; 
  this.tbK.Text = "1"; 
  this.tbL.Text = "2"; 
  } 
  private void set2() 
  ...{ 
  this.tbA.Text = "1"; 
  this.tbB.Text = "1.5"; 


  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "1"; 
  this.tbL.Text = "2"; 
  } 
  private void set3() 
  ...{ 
  this.tbA.Text = "0.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "3"; 
  this.tbK.Text = "3"; 
  this.tbL.Text = "2"; 
  } 
  private void set4() 
  ...{ 
  this.tbA.Text = "1.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "0.5"; 
  this.tbL.Text = "2"; 
  } 
  private void set5() 
  ...{ 

  this.tbA.Text = "2"; 
  this.tbB.Text = "2.5"; 
  this.tbC.Text = "3"; 
  this.tbD.Text = "3.5"; 
  this.tbK.Text = "4"; 
  this.tbL.Text = "6"; 
  } 
  private void set6() 
  ...{ 
  this.tbA.Text = "0.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "2"; 
  this.tbL.Text = "4"; 
  } 
  public Form1() 
  ...{ 
  InitializeComponent(); 
  } 
  private void Form1_Load(object sender, EventArgs e) 
  ...{ 
  //set1(); 
  } 
  private void Form1_Paint(object sender, PaintEventArgs e) 
  ...{ 
  } 
  private void pictureBox1_Paint(object sender, PaintEventArgs e) 
  ...{ 
  float d; 
  float x1; 
  float x2; 
  float y1; 
  float y2; 
  PointF p1; 
  PointF p2; 
  int unit = 40;//放大倍數(shù) 
  Font font = new Font("MS UI Gothic", 12); 
  SolidBrush brush = new SolidBrush(Color.Black); 
  float interval = 0.001F; //步進(jìn)刻度,值越小越精確(必須大小0),但速度也越慢 
  PointF o = new PointF(this.pictureBox1.Width / 2, this.pictureBox1.Height / 2); 
  e.Graphics.DrawLine(Pens.Red, 0, this.pictureBox1.Height / 2, this.pictureBox1.Width, this.pictureBox1.Height / 2); 
  e.Graphics.DrawLine(Pens.Red, this.pictureBox1.Width / 2, 0, this.pictureBox1.Width / 2, this.pictureBox1.Height); 
  e.Graphics.DrawString("O", font, brush, o); 
  if (type1 == 0) 
  ...{ 
  for (d = -6.28F; d < 6.28F; d += interval) 
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(unit * System.Math.Sin(d)); 
  y2 = o.Y - (float)(unit * System.Math.Sin(d + interval)); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Black, p1, p2); 
  } 
  } 
  else if (type1 == 1) 
  ...{ 
  //set1(); 
  PointF o1 = new PointF(this.pictureBox1.Width/2, this.pictureBox1.Height / 4); 
  e.Graphics.DrawString("1", font, brush, o1); 


  if (type2 == 1) 
  ...{ 
  for (d = 0; d < a; d += interval) 
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 
  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Black, p1, p2); 
  tempx = x2; 
  tempy = this.pictureBox1.Height/2; 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  else if (type2 == 2) 
  ...{ 
  for (d = a; d < 2*a; d += interval) 


  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 
  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Blue, p1, p2); 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  else if (type2 == 3) 
  ...{ 
  for (d = a; d  
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 


  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Blue, p1, p2); 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  } 
  else if (type1 == 2) 
  ...{ 
  //set2(); 
  PointF o1 = new PointF(this.pictureBox1.Width/2, this.pictureBox1.Height / 4); 
  e.Graphics.DrawString("1", font, brush, o1);

相關(guān)文章

  • Unity接入百度AI實(shí)現(xiàn)果蔬識(shí)別

    Unity接入百度AI實(shí)現(xiàn)果蔬識(shí)別

    本文將介紹如何利用Unity接入百度AI從而實(shí)現(xiàn)果蔬識(shí)別,可以做到識(shí)別近千種水果和蔬菜的名稱,可自定義返回識(shí)別結(jié)果數(shù)。感興趣的小伙伴可以了解一下
    2022-02-02
  • C#實(shí)現(xiàn)將應(yīng)用程序設(shè)置為開機(jī)啟動(dòng)的方法

    C#實(shí)現(xiàn)將應(yīng)用程序設(shè)置為開機(jī)啟動(dòng)的方法

    這篇文章主要介紹了C#實(shí)現(xiàn)將應(yīng)用程序設(shè)置為開機(jī)啟動(dòng)的方法,涉及C#針對(duì)注冊(cè)表的寫入技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-09-09
  • Entity?Framework配置關(guān)系

    Entity?Framework配置關(guān)系

    這篇文章介紹了Entity?Framework配置關(guān)系的方法,文中通過示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-06-06
  • C#特性(Attribute)

    C#特性(Attribute)

    這篇文章介紹了C#的特性(Attribute),文中通過示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-03-03
  • 簡單記錄C# 條件編譯

    簡單記錄C# 條件編譯

    條件編譯是C#比Java多出的東西,但我跟前輩請(qǐng)教后,他們都說條件編譯在實(shí)際的項(xiàng)目開發(fā)中不怎么使用.下面僅僅是將步奏記錄下來,有需要的小伙伴可以參考下。
    2015-06-06
  • C#實(shí)現(xiàn)外排序的示例代碼

    C#實(shí)現(xiàn)外排序的示例代碼

    本文介紹了C#中的外排序技術(shù),以及如何使用C#實(shí)現(xiàn)外排序算法,通過使用排序算法,可以對(duì)大量數(shù)據(jù)進(jìn)行排序,并且可以有效地處理超大數(shù)據(jù)集,感興趣的可以了解下
    2023-11-11
  • C#11新特性使用案例詳解

    C#11新特性使用案例詳解

    這篇文章主要為大家介紹了C#11新特性的使用案例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-05-05
  • C#中序列化實(shí)現(xiàn)深拷貝,實(shí)現(xiàn)DataGridView初始化刷新的方法

    C#中序列化實(shí)現(xiàn)深拷貝,實(shí)現(xiàn)DataGridView初始化刷新的方法

    下面小編就為大家?guī)硪黄狢#中序列化實(shí)現(xiàn)深拷貝,實(shí)現(xiàn)DataGridView初始化刷新的方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-02-02
  • C#接口(Interface)用法分析

    C#接口(Interface)用法分析

    這篇文章主要介紹了C#接口(Interface)用法,較為詳細(xì)的分析了C#中接口的功能、實(shí)現(xiàn)及使用技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-03-03
  • C#程序中創(chuàng)建、復(fù)制、移動(dòng)、刪除文件或文件夾的示例

    C#程序中創(chuàng)建、復(fù)制、移動(dòng)、刪除文件或文件夾的示例

    這篇文章主要介紹了C#程序中創(chuàng)建、復(fù)制、移動(dòng)、刪除文件或文件夾的示例,即對(duì)System.IO命名空間中類的運(yùn)用,需要的朋友可以參考下
    2016-02-02

最新評(píng)論