Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Lab1 #206

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Lab1 #206

Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added trunk/as005929/task_01/doc/images/linealmodel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions trunk/as005929/task_01/doc/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Министерство образования Республики Беларусь
Учреждение образования Брестский Государственный Технический Университет
Кафедра ИИТ
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
## Лабораторная работа №1
## "Математические модели информационных процессов и управления"
###"Моделирование контролируемого объекта"
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
Выполнил:
Студент 3 курса
Группы АС-59
Хубиев М.А.

Проверил:
Иванюк Д.С.
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
Брест 2022

### Цель работы: контроль температуры объекта
## Ход работы
Надо смоделировать температуру определенного объекта


36 changes: 36 additions & 0 deletions trunk/as005929/task_01/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include <iostream>
#include <cmath>
#include <fstream>
const double a = 1, b1 = 0.05,b2 = 0.00001, c=0.05, d = 0.005;
double nolinemodel(double& x, double& y,double& t){
return a * x - b2*pow(y,t) + c* y + d* sin(y);
}
double linemodel(double&x, double& y){
return a* x + b1*y;
}
int main(){
double x, y, t=0;
std::cout<<"Input (y_t): ";
std::cin>>x;
std::cout<<std::endl;
std::cout<<"Input (x_t): ";
std::cin>>y;
std::cout<<"Input t: ";
std::cin>>t;
std::ofstream file;
file.open("answ.txt");
file<<"Line model\n";
for(int i = 0;i<t;i++){
x = linemodel(x,y);
file<<x<<"\n";
}
file<<"\n";
file<<"NolineModel\n";
for(int i=0;i<t;i++){
x = nolinemodel(x,y,t);
file<<x<<"\n";
}
file<<"\n";
file.close();
return 0;
}