1 Mayıs 2013 Çarşamba
double xg, xi, yu, ya, a, b, c, d;
int i;
double[] t1 = new double[15];
double[] t2 = new double[15];
double[] t3 = new double[15];
double[] t4 = new double[15];
xi = Convert.ToDouble(textBox1.Text);
xg = Convert.ToDouble(textBox2.Text);
yu = Convert.ToDouble(textBox3.Text);
ya = Convert.ToDouble(textBox4.Text);
a = (-1) * (xg + yu);
b = (-1) * (xi + yu);
c = (-1) * (xg + ya);
d = (-1) * (xi + ya);
label1.Text=a + "*" + b + "--*" + c + "--*" + d;
t1[0] = 0;
t2[0] = 0;
t3[0] = 0;
t4[0] = 0;
listBox1.Items.Add(t1[0].ToString());
listBox2.Items.Add(t2[0].ToString());
listBox3.Items.Add(t3[0].ToString());
listBox4.Items.Add(t4[0].ToString());
//try-catch kullanmayı unutma
for (i = 0; i <= 13; i++)
{
t1[i + 1] = (a - t2[i] - t3[i]) / (-4);
listBox1.Items.Add(t1[i + 1].ToString());
t2[i + 1] = (b - t1[i + 1] - t4[i]) / (-4);
listBox2.Items.Add(t2[i + 1].ToString());
t3[i + 1] = (c - t1[i + 1] - t4[i]) / (-4);
listBox3.Items.Add(t3[i + 1].ToString());
t4[i + 1] = (d - t2[i + 1] - t3[i + 1]) / (-4);
listBox4.Items.Add(t4[i + 1].ToString());
}
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 hisarlar_vinç
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label9_Click(object sender, EventArgs e)
{
}
private void textBox7_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
double m,a,a1,a2,b1,b2,b3, f, mo, si, ı,l, x1, x2, y1, y2,el,y;
double em, ak, s;
try
{
s = Convert.ToDouble(textBox9.Text);
x1 = Convert.ToDouble(textBox1.Text);
y1 = Convert.ToDouble(textBox2.Text);
x2 = Convert.ToDouble(textBox3.Text);
y2 = Convert.ToDouble(textBox4.Text);
l = Convert.ToDouble(textBox5.Text);
m = Convert.ToDouble(textBox6.Text);
el = Convert.ToDouble(textBox7.Text);
a = Convert.ToDouble(textBox8.Text);
a1 = y1 + (2 * y2);
a2 = x2 - (2 * a) - (2 * x1);
b1 = (x2 * Math.Pow(a1, 3)) / 12;
b2 = (a2 * Math.Pow(y1, 3)) / 12;
b3 = (2 * a * Math.Pow(y1, 3)) / 12;
label21.Text = "a1=" + a1 + "a2=" + a2 + "b1=" + b1 + "b2=" + b2 + "b3=" + b3;
f = m * 9.81;
label11.Text = f.ToString() + " N";
mo = f * l / 4;
label12.Text = mo.ToString() + " N.mm";
ı = b1 - b2 - b3;
// atalet momenti hesabına dikat et !
label18.Text = ı.ToString() + " mm^4";
si = (mo * (y1 + 2 * y2)) / ı;
label14.Text = si.ToString() + " N/mm^2";
y = f * (Math.Pow(l, 3)) / (48 * el * ı);
label16.Text = y.ToString() + " mm";
if (radioButton1.Checked == true)
{
ak = 230;
em = ak / s;
label22.Text = "malzeme için alınması gereken";
label23.Text = "emniyet gerilmesi" + em.ToString() + " N/mm^2 ";
if (si<em)
{
MessageBox.Show("eğilme gerilmesi( " + si + ") " + "<" + "emniyetli gerilme( " + em + ")","sistem emniyetli");
}
else
{
MessageBox.Show("sistem emniyetsiz!");
}
}
else if (radioButton2.Checked == true)
{
ak = 275;
em = ak / s;
label22.Text = "malzeme için alınması gereken";
label23.Text = "emniyet gerilmesi" + em.ToString() + " N/mm^2 ";
if (si< em)
{
MessageBox.Show("eğilme gerilmesi( " + si + ") " + "<" + "emniyetli gerilme( " + em + ")", "sistem emniyetli");
}
else
{
MessageBox.Show("sistem emniyetsiz!");
}
}
else if (radioButton3.Checked == true)
{
ak = 300;
em = ak / s;
label22.Text = "malzeme için alınması gereken";
label23.Text = "emniyet gerilmesi" + em.ToString() + " N/mm^2 ";
if (si <em)
{
MessageBox.Show("eğilme gerilmesi( " + si+ ") " + "<" + "emniyetli gerilme( " + em + ")", "sistem emniyetli");
}
else
{
MessageBox.Show("sistem emniyetsiz!");
}
}
else if (radioButton5.Checked == true)
{
ak = 357;
em = ak / s;
label22.Text = "malzeme için alınması gereken";
label23.Text = "emniyet gerilmesi" + em.ToString() + " N/mm^2 ";
if (mo < em)
{
MessageBox.Show("eğilme gerilmesi( " + mo + ") " + "<" + "emniyetli gerilme( " + em + ")", "sistem emniyetli");
}
else
{
MessageBox.Show("sistem emniyetsiz!");
}
}
else if (radioButton6.Checked == true)
{
ak = 415;
em = ak / s;
label22.Text = "malzeme için alınması gereken";
label23.Text = "emniyet gerilmesi" + em.ToString() + " N/mm^2 ";
if (mo < em)
{
MessageBox.Show("eğilme gerilmesi( " + mo + ") " + "<" + "emniyetli gerilme( " + em + ")", "sistem emniyetli");
}
else
{
MessageBox.Show("sistem emniyetsiz!");
}
}
else if (radioButton6.Checked == false || radioButton5.Checked == false || radioButton3.Checked == false || radioButton2.Checked == false || radioButton1.Checked == false)
{
MessageBox.Show("malzeme seçiniz !");
}
}
catch {
MessageBox.Show("LÜTFEN SAYISAL DEĞERLER GİRİNİZ YADA BOŞ BIRAKMAYINIZ !");
}
}
private void Form1_Load(object sender, EventArgs e)
{
textBox7.Text = "2100000";
this.MaximumSize = new Size(1020,5500);
this.Text = " Vinç kolonunun sehim hesabı ";
MessageBox.Show("Vinç kolon hesabı","A. Tunç");
}
private void label8_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button3_Click(object sender, EventArgs e)
{
Form f = new Form2();
f.Visible = true;
f.Show();
}
private void label22_Click(object sender, EventArgs e)
{
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}
30 Nisan 2013 Salı
19 Nisan 2013 Cuma
16 Mart 2013 Cumartesi
c# ile android uygulaması geliştirmek
http://www.yusufyilman.com/csharp-ile-android-uygulama-gelistirmek.html
gauss seidel C# kodları
double[] x1=new double[15];
double[] x2 = new double[15];
double[] x3 = new double[15];
double[] x4 = new double[15];
int i=0;
x1[0] = 0;
x2[0] = 0;
x3[0] = 0;
x4[0] = 0;
for(i=1;i<=12;i++)
{
x1[i+1]=(6+(x2[i])-(x3[i])+2*(x4[i]))/4;
listBox1.Items.Add(x1[i+1].ToString());
x2[i+1] = (8 + (x1[i+1]) + 2 * (x3[i]) - (x4[i])) / (-5);
listBox2.Items.Add(x2[i+1].ToString());
x3[i+1] = (2 * (x1[i+1]) - (x2[i+1]) - 2 * (x4[i]) - 15) / 8;
listBox3.Items.Add(x3[i+1].ToString());
x4[i+1] = (20 - 3 * (x1[i+1]) - 2 * (x2[i+1]) + (x3[i+1])) / 10;
listBox4.Items.Add(x4[i+1].ToString());
}
NoT: Nimeti Döner hocamızın Sayısal Analiz adlı kitabındaki syf. 87 örnek 2 nin çözümüdür.
double[] x2 = new double[15];
double[] x3 = new double[15];
double[] x4 = new double[15];
int i=0;
x1[0] = 0;
x2[0] = 0;
x3[0] = 0;
x4[0] = 0;
for(i=1;i<=12;i++)
{
x1[i+1]=(6+(x2[i])-(x3[i])+2*(x4[i]))/4;
listBox1.Items.Add(x1[i+1].ToString());
x2[i+1] = (8 + (x1[i+1]) + 2 * (x3[i]) - (x4[i])) / (-5);
listBox2.Items.Add(x2[i+1].ToString());
x3[i+1] = (2 * (x1[i+1]) - (x2[i+1]) - 2 * (x4[i]) - 15) / 8;
listBox3.Items.Add(x3[i+1].ToString());
x4[i+1] = (20 - 3 * (x1[i+1]) - 2 * (x2[i+1]) + (x3[i+1])) / 10;
listBox4.Items.Add(x4[i+1].ToString());
}
NoT: Nimeti Döner hocamızın Sayısal Analiz adlı kitabındaki syf. 87 örnek 2 nin çözümüdür.
13 Mart 2013 Çarşamba
Kaydol:
Kayıtlar (Atom)