Created
September 21, 2017 01:57
ccc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
namespace WindowsFormsApp2 | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
double a3, b3, c3; | |
// a = b = c1 = 0; | |
a3 = Convert.ToDouble(textBox1.Text); | |
b3 = Convert.ToDouble(textBox2.Text); | |
c3 = Convert.ToDouble(textBox3.Text); | |
chart1.Series[0].Points.Clear(); // 清除原始 Diagram before 進入 Loop | |
for (double z2 = -10; z2 <= 10; z2 = z2 + 0.1) //修改變數名稱 | |
{ | |
double Ans; | |
a3 = b3 = c3 = 0; | |
Ans = 1 / (1 + Math.Pow((Math.Abs((z2 - c3) / a3)), 2 * b3)); | |
chart1.Series[0].Points.AddXY(z2, Ans); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment