-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrk4_index.h
41 lines (32 loc) · 826 Bytes
/
rk4_index.h
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
37
38
39
40
#ifndef RK4CIRCUITSIMULATION
#define RK4CIRCUITSIMULATION 1
#define maxLimit 10
#include <fstream>
#include <string>
#include <vector>
using namespace std;
class RK4CircSim
{
public:
void setParameters();
void showData();
void inputT();
void outputTrueY();
void outputDiffY();
void setStepSize();
void kValues();
// double twoPiF(double inputFreq);
// double stepSize();
private:
string userName;
double paramA, paramB, paramD, paramC, paramR, paramF;
double inputPeriod;
double twoPiF, twoPiFRC, denomTwoPiFRC, cosB, sinB, capTimeConst;
double stepFactor, stepSize;
vector<double> data_inputT;
vector<double> data_trueY;
vector<double> data_diffY;
vector<double> data_approxY;
vector<double> rk_phi, rk_k1, rk_k2, rk_k3, rk_k4;
};
#endif