SHARE
TWEET

Untitled

a guest Oct 21st, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "iostream"
  2. #include <iomanip>
  3.  
  4. void BM() {
  5.     float I1 = 0.1024f, I2 = 1.9511f, I3 = 0.8245f, I4 = 0.8245f;
  6.     float I5 = 4.2290f, I6 = 3.7710f, I7 = 1.1266f, I8 = 2.9465f;
  7.     float R1 = 730.f, R2 = 260.f, R3 = 590.f, R4 = 260.f;
  8.     float R5 = 860.f, R6 = 770.f, R7 = 770.f, R8 = 410.f;
  9.     float J1 = 5.f, J2 = 8.f;
  10.     float E1 = 900.f, E2 = 400.f;
  11.     float U35 = (I5 * R5);
  12.     float U21 = (I1 * R1) + E2;
  13.     float left = (-1) * (E2 * I1) + (E1 * I7) + (J2 * U35) + (J1 * U21);
  14.     float right = (I1 * I1 * R1) + (I2 * I2 * R2) + (I3 * I3 * R3) + (I4 * I4 * R4) + (I5 * I5 * R5) + (I6 * I6 * R6) + (I7 * I7 * R7) + (I8 * I8 * R8);
  15.     std::cout << "\n\n\n";
  16.     std::cout << I1 * I1 << "* " << R1 << "+ ";
  17.     std::cout << I2 * I2 << "* " << R2 << "+ ";
  18.     std::cout << I3 * I3 << "* " << R3 << "+ ";
  19.     std::cout << I4 * I4 << "* " << R4 << "+ ";
  20.     std::cout << I5 * I5 << "* " << R5 << "+ ";
  21.     std::cout << I6 * I6 << "* " << R6 << "+ ";
  22.     std::cout << I7 * I7 << "* " << R7 << "+ ";
  23.     std::cout << I8 * I8 << "* " << R8 << "= ";
  24.     std::cout << "-" << (E2 * I1) << " + " << E1 * I7 << " + " << J2 * U35 << " + " << J1 * U21 << "\n\n\n";
  25.  
  26.     //
  27.     std::cout << (I1 * I1 * R1) << " + " << (I2 * I2 * R2) << " + " << (I3 * I3 * R3) << " + " << (I4 * I4 * R4) << " + ";
  28.     std::cout << (I5 * I5 * R5) << " + " << (I6 * I6 * R6) << " + " << (I7 * I7 * R7) << " + " << (I8 * I8 * R8) << " = ";
  29.     std::cout << left << "\n\n";
  30.     //
  31.     std::cout <<std::setprecision(10) << left << ", " << right << std::endl;
  32. }
  33.  
  34. void MUP() {
  35.     float R1 = 730.f, R2 = 260.f, R3 = 590.f, R4 = 260.f;
  36.     float R5 = 860.f, R6 = 770.f, R7 = 770.f, R8 = 410.f;
  37.     float J1 = 5.f, J2 = 8.f;
  38.     float E1 = 900.f, E2 = 400.f;
  39.     float g22 = 1 / R1 + 1 / R6 + 1 / R7;
  40.     float g33 = 1 / (R3+R4) + 1 / (R5 + R6) + 1 / R8;
  41.     float g44 = 1 / R2 + 1 / (R3 + R4) + 1 / R7;
  42.     float g23 = 1 / (R5 + R6);
  43.     float g24 = 1 / R7;
  44.     float g34 = 1 / (R3 + R4);
  45.     float Iy2 = -E1 / R7 + E2 / R1 + J1;
  46.     float Iy3 = J2;
  47.     float Iy4 = E1 / R7;
  48.     float g32 = g23, g42 = g24, g43 = g34;
  49.     std::cout << "\n\n\n";
  50.     std::cout << g22 << "  " << g23 << "  " << g24 << "  " << Iy2 << std::endl;
  51.     std::cout << g32 << "  " << g33 << "  " << g34 << "  " << Iy3 << std::endl;
  52.     std::cout << g42 << "  " << g43 << "  " << g44 << "  " << Iy4 << std::endl;
  53.     std::cout << "\n\n\n";
  54. }
  55.  
  56. int main() {
  57.     MUP();
  58.  
  59.     return 0;
  60. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top