Microsoft Word - Homework11.docx ENGR 102 - Homework 11 Complete the following problems 1 and 2. Submit results to eCampus. Problem 1: You are tasked with a function to easily solve systems of...

1 answer below »
check attached files


Microsoft Word - Homework11.docx ENGR 102 - Homework 11 Complete the following problems 1 and 2. Submit results to eCampus. Problem 1: You are tasked with a function to easily solve systems of equations that will solve the following problems. Once you have completed (written and tested) all the problems, submit a single pdf that inlcudes the function, the program that calls the function, the screenshot that displays the results. a. Write a python function named L_solve102 that will take two parameters as input, the coefficient matrix and the solution vector. The function should return the solution to the unknown variables. Optional: If no solution exists, the function print “No Solution.” Save your function file as engr102_linalg.py. b. Write a new python program that will import the function from parts (a) and solve the following problems. Your code should define the appropriate coefficient matrix and solution vector for parts i-iv (please use comments), call the function, and print the results. Take a screenshot to verify of output to verify successful execution. i. ii. iii. iv. c. Applying Kirchhoff’s Laws to the electrical network in the figure, the currents and are the solution of the system. Solve the system of equations and display the results using your function from part (a). Remember to use a descriptive output statement so it is easy to identify the results. Save the results described above as Lab11_Act1.pdf and save to your file to eCampus. x + y = 4 x − y = 2 3x + 2y = 4 5x − 2y = 12 x − 2y + 3z = 9 −x + 3y = −4 2x −5y +5z = 17 6x − y + z = −1 4x − 3z = −19 2y +5z = 25 I1 − I2 + I3 = 0 3I1 − 2I2 = 7 2I2 + 4I3 = 8 Problem 2: d. A sample of Aluminum powder was irradiated in the NSC Triga reactor. Measurements indicate that there are two isotopes of Aluminum (28Al and 29Al). Download the dataset Al_decay.txt and write a python program to display the data. The plot should utilize a dashed line for 28Al and a green dash dot line for 29Al. Be sure to label both axis and include a title and legend. Save the plot as a .png file. Save your code as Lab11_Act2.pdf and save to your file to eCampus. time (Sec)Al-28 CountsAl-29 Counts 020001000 101899.549755982.5473851 201804.144636965.3993639 301713.53125948.5506206 401627.468933931.9959319 501545.729107915.7301657 601468.094673899.7482798 701394.359438884.0453195 801324.327564868.616417 901257.81305853.4567892 1001194.639236838.5617365 1101134.638334823.9266414 1201077.650984809.546967 1301023.525831795.4182555 140972.1191212781.536127 150923.2943192767.8962779 160876.9217489754.4944799 170832.8782466741.3265783 180791.0468346728.3884909 190751.3164104715.6762071 200713.5814516703.1857858 210677.7417357690.9133551 220643.702074678.8551104 230611.3720585667.0073135 240580.6658219655.3662917 250551.5018099643.9284362 260523.8025639632.6902012 270497.4945159621.6481027 280472.5077929610.7987178 290448.7760311600.138683 300426.2361999589.6646936 310404.8284346579.3735028 320384.4958768569.2619202 330365.1845243559.3268111 340346.8430868549.5650956 350329.4228503539.9737476 360312.8775472530.5497937 370297.1632341521.2903125 380282.2381743512.1924334 390268.0627274503.2533361 400254.599244494.4702494 410241.8119658485.8404506 420229.6669302477.3612643 430218.1318805469.0300619 440207.17618460.8442609 450196.770731452.8013235 460186.8878969444.8987563 470177.5014294437.1341096 480168.5863984429.5049764 490160.1191259422.0089914 500152.0771231414.643831 510144.439031407.4072119 520137.184563400.2968907 530130.2944515393.3106632 540123.7503967386.4463636 550117.5350178379.7018641 560111.6318072373.0750736 570106.025086366.563938 580100.699963360.1664388 59095.64229506353.8805926 60090.83864907347.7044509 61086.27626679341.636099 62081.94303071335.6736557 63077.82743195329.8152727 64073.91853965324.0591337 65070.20597194318.4034545 66066.67986839312.8464816 67063.33086383307.3864924 68060.15006343302.0217943 69057.12901913296.7507243 70054.25970714291.5716481 71051.5345067286.4829604 72048.94617979281.4830836 73046.48785191276.5704678 74044.15299385271.7435899 75041.93540432267.0009537 76039.8291935262.3410888 77037.82876738257.7625508 78035.9288129253.2639203 79034.12428387248.8438026 80032.41038753244.5008276 81030.78257185240.2336488 82029.2365134236.0409434 83027.76810593231.9214117 84026.37344941227.8737766 85025.04883968223.8967833 86023.79075864219.989199 87022.59586487216.1498122 88021.46098479212.3774328 89020.3831042208.6708912 90019.35936029205.0290385 91018.38703405201.4507457 92017.46354301197.9349034 93016.58643442194.4804217 94015.75337872191.0862298 95014.96216335187.7512754 96014.21068686184.4745247 97013.49695337181.2549619 98012.81906723178.0915888 99012.17522801174.9834249 100011.56372569171.9295066 101010.98293615168.9288871 102010.43131684165.9806363 10309.90740267163.0838402 10409.409802157160.2376007 10508.937193691157.4410355 10608.488322042154.6932778 10708.061995028151.9934756 10807.657080339149.340792 10907.272502541146.7344046 11006.90724021144.1735056 11106.560323224141.6573009 11206.230830186139.1850106 11305.917885976136.7558682 11405.620659428134.3691207 11505.338361119132.0240282 11605.070241278129.7198636 11704.815587789127.4559128 11804.573724302125.2314738 11904.344008438123.0458572 12004.125830082120.8983852 12103.918609761118.7883922 12203.721797105116.7152242 12303.53486939114.6782383 12403.357330141112.6768032 12503.188707823110.7102983 12603.028554582108.7781141 12702.876445057106.8796516 12802.731975252105.0143222 12902.59476146103.1815476 13002.464439248101.3807598 13102.34066248499.61140046 13202.22310242497.87292104 13302.11144683396.16478264 13402.00539915794.48645572 13501.90467773892.83741999 13601.80901506691.21716425 13701.71815706289.62518621 13801.63186241388.06099234 13901.54990192486.52409776 14001.4720579185.014026 14101.39812362183.53030894 14201.3279026982.07248662 14301.26120861580.64010712 14401.19786425879.23272638 14501.13770137977.84990812 14601.08056018876.49122365 14701.0262889275.15625178 14800.97474343373.84457865 14900.92578682572.55579766 15000.87928906871.28950926 15100.83512666770.04532091 15200.79318232868.8228469 15300.75334464867.62170825 15400.71550782166.44153262 15500.67957135365.28195413 15600.64543979864.14261333 15700.61302250563.02315699 15800.58223337561.9232381 15900.55299063260.84251568 16000.5252166159.78065468 16100.49883754158.73732593 16200.47378336557.712206 16300.44998753756.70497709 16400.42738685855.71532696 16500.40592130154.74294882 16600.38553385453.78754121 16700.36617036952.84880797 16800.34777941751.92645807 16900.33031215351.02020559 17000.31372218550.12976959 17100.2979654549.25487403 17200.28300009848.39524768 17300.26878638447.55062406 17400.25528655546.72074133 17500.24246475645.90534222 17600.23028693445.10417396 17700.21872074544.31698818 17800.20773546843.54354085 17900.19730192942.7835922 18000.18739241542.03690664 18100.17798060841.30325269 18200.16904151140.58240293 18300.1605513839.87413388 18400.15248766739.17822597 18500.14482895538.49446348 18600.13755490337.82263444 18700.13064619237.16253056 18800.12408447136.51394723 18900.11785231335.87668337 19000.11193316635.25054143 19100.10631130934.6353273 19200.1009718134.03085027 19300.09590048933.43692294 19400.09108387532.8533612 19500.08650917632.27998414 19600.08216424231.71661401 19700.07803753331.16307616 19800.07411808930.61919899 19900.07039549830.0848139 20000.06685987629.55975523 20100.0635018329.0438602 20200.06031244328.5369689 20300.05728324328.03892417 20400.05440618527.54957162 20500.05167362827.06875956 20600.04907831426.59633892 20700.0466133526.13216326 20800.04427218825.67608867 20900.04204861225.22797379 21000.03993671624.78767967 21100.03793088924.35506985 21200.03602580623.93001019 21300.03421640523.51236894 21400.03249788223.10201662 21500.03086567222.69882602 21600.0293154422.30267215 21700.02784306821.9134322 21800.02644464721.5309855 21900.02511646121.15521351 22000.02385498420.78599971 22100.02265686420.42322966 22200.0215189220.0667909 22300.0204381319.71657292 22400.01941162219.37246717 22500.01843667119.03436696 22600.01751068718.70216748 22700.01663121118.37576576 22800.01579590618.05506059 22900.01500255517.73995257 23000.0142490517.43034401 23100.01353338917.12613893 23200.01285367316.82724302 23300.01220809616.53356363 23400.01159494316.24500971 23500.01101258515.96149181 23600.01045947715.68292204 23700.00993414815.40921404 23800.00943520515.14028296 23900.0089613214.87604543 24000.00851123714.61641954
Answered Same DayNov 13, 2021

Answer To: Microsoft Word - Homework11.docx ENGR 102 - Homework 11 Complete the following problems 1 and 2....

Suraj answered on Nov 13 2021
144 Votes
#!/usr/bin/env python
# coding: utf-8
# In[3]:
def print_matrix(Title, M):
print(Title)
for row in M:
print([round(x,3)+0 for x in row])

def print_matrices(Action, Title1, M1, Title2, M2):
print(Action)
print(Title1, '\t'*int(len(M1)/2)+"\t"*len(M1), Title2)
for i in range(len(M1)):
row1 = ['{0:+7.3f}'.format(x) for x in M1[i]]
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here