-
Notifications
You must be signed in to change notification settings - Fork 0
/
control.c++
36 lines (32 loc) · 857 Bytes
/
control.c++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <vector>
#include "tf.h"
using namespace std;
/*void Block_diagram(){
Input
Controller
Plant
Sensor
//How to use 1+CGH directly?
Total_func = Controller * Plant /(1+ Sensor* Plant * Controller);
Output = Total_func * Input;
Output.Display();
//How to show the output signal... I might need to have an Inverse Laplace in trans_func in this case so that I could have
//time varient system.
}
*/
int main() {
vector<int> num = {1,23,3};
vector<int> den = {1,2,5,7,8};
trans_func func;
trans_func func1(num);
trans_func func2(den);
trans_func test1 = func1 + func2;
trans_func test2 = func1 / func2;
trans_func test3 = func1 * func2;
cout << "test display" <<endl;
test1.Display();
test2.Display();
test3.Display();
return 0;
}