Skip to main content
Skip header
Ukončeno v akademickém roce 2012/2013

Probabilistic Calculations in Mechanics

Type of study Doctoral
Language of instruction Czech
Code 339-0924/01
Abbreviation PVvM
Course title Probabilistic Calculations in Mechanics
Credits 10
Coordinating department Department of Mechanics of Materials
Course coordinator prof. Ing. Karel Frydrýšek, Ph.D., FEng.

Osnova předmětu

dodělat /*
* Created by SharpDevelop.
* User: roj71
* Date: 20.3.2012
* Time: 9:39
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.IO;

namespace cteni_dat
{
class Program
{


public static double [,] Nacteni (string soubor)
{
string line = null;
string hodnota = null;
int HL = 0;
double [,] hodnoty = new double [2,2];

TextReader reader = new StreamReader (soubor);

//prvni radek
line = reader.ReadLine();

//prvni radek prvni hodnota
for (int i = 0; i<11; i++){
if (!line[i].Equals(';')) hodnota +=line[i];
else { hodnoty [0,HL] = double.Parse (hodnota);hodnota = null; }}
//prvni radek druha hodnota
for (int i = 11; i<line.Length; i++){
if (!line[i].Equals(';')) hodnota +=line[i];
else { hodnoty [1,HL] = double.Parse (hodnota);hodnota = null; }}

HL = HL + 1;
//druhy radek
line = reader.ReadLine();

//druhy radek prvni hodnota
for (int i = 0; i<11; i++){
if (!line[i].Equals(';')) hodnota +=line[i];
else { hodnoty [0,HL] = double.Parse (hodnota);hodnota = null; }}
//druhy radek druha hodnota
for (int i = 11; i<line.Length; i++){
if (!line[i].Equals(';')) hodnota +=line[i];
else { hodnoty [1,HL] = double.Parse (hodnota);hodnota = null; }}

// atd....
//lepsi je svazat radky a pocet cisel do cyklu for

reader.Close();
return hodnoty;
}



public static void Main(string[] args)
{
Console.WriteLine("Hello World!");

double [,] cislo = new double [2,2];

cislo=Nacteni ("data.txt");

Console.WriteLine("1 - 1 prectene cislo je {0}",cislo[0,0]);
Console.WriteLine("1 - 2 prectene cislo je {0}",cislo[1,0]);
Console.WriteLine("2 - 1 prectene cislo je {0}",cislo[0,1]);
Console.WriteLine("2 - 2 prectene cislo je {0}",cislo[1,1]);

Console.WriteLine("atd.");
Console.ReadKey(true);
}
}
}

Povinná literatura

MAREK, P., BROZZETTI, J., GUŠTAR M.: Probabilistic Assessment of Structures Using Monte Carlo Simulation Background, Exercises and Software, 2nd edition, ITAM CAS, Prague, 2003, Czech Republic, ISBN 80-386246-08-6, pp.471 (cd attached).
MAREK, P., GUŠTAR, M., BATHON, L.: Tragwerksbemessung von deterministischen zu probalistischen verfahren, Academia, Nakladatelství akademie věd ČR, 1998, ISBN 80-200-0706-7, pp.263.

Doporučená literatura

HALDAR, A., MAHADEVAN, S.: Probability, Reliability and Statistical Methods in Engineering Design, John Willey & Sons, Inc, ISBN 0-471-33119-8 , New York, USA, 2001