Skip to content

Instantly share code, notes, and snippets.

@X-G
Created June 15, 2015 14:30
Show Gist options
  • Save X-G/edc65222b3c4a691eb95 to your computer and use it in GitHub Desktop.
Save X-G/edc65222b3c4a691eb95 to your computer and use it in GitHub Desktop.
B1 = 30.00000
B2 = 50.00000
B3 = 0.005000
B4 = 517.0000
B5 = 598.0000
B6 = 321.0000
B7 = 236.0000
B8 = 45000.00
B9 = 15000.00
B10 = 0.30000
B11 = 40.0000
B12 = 20.0000
B13 = 5.34622
matPara = [0] * 14
matPara[0] = B8
matPara[1] = B9
matPara[2] = B10
matPara[3] = B1
matPara[4] = (B2 - B1) / B3
matPara[6] = B12
matPara[7] = 0.5*((1 / B9 - 1 / B8)*(0.5)*(B4*B4 - B7*B7) + (B4 - B7)*B3)
matPara[8] = 0.5*((1 / B9 - 1 / B8)*(0.5)*(B5*B5 - B6*B6) + (B5 - B6)*B3)
matPara[9] = B3
matPara[11] = B2 / B3
matPara[13] = B11
matPara[12] = matPara[7] - matPara[11]*B3*B3*(0.5)
matPara[10] = 0.5*((1 / B9 - 1 / B8)*(0.5)*(B5*B5 - B4*B4 + B6*B6 - B7*B7) + (B5 - B4 + B6 - B7)*B3 - 2*(matPara[4] - matPara[11])*B3*B3)
matPara[5] = (B13 - matPara[12]) / (B11 - B12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment