Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double MEuler(){
- double Cp = 0;
- for (int time = 0; time < (ultima_toma_min + toma_min); time ++){
- if (time % h == 0){
- cout << "Hora " << time / 60.0 << " - ";
- cout << setprecision(7) << "Cp: " << Cp << "\n";
- }
- Cp = nextY(h, Cp, time);
- }
- return Cp;
- }
- int Dt(int minutes){
- int result;
- if (minutes % (toma_min) == 0 && minutes > 0 && minutes <= 24 * 4 * 60)
- result = 250;
- else
- result = 0;
- //cout << "hora " << hours << ":" << "Dt= " << result << endl;
- return result;
- }
- double nextY(double h, double y, double minutes){
- //cout << "dy = " << (Dt(hours) - Ke*y) / Vap << endl;
- return (y + (Dt(minutes) - Ke*y) / Vap);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement