subject
Engineering, 31.10.2019 00:31 cassidy100117

Given the expression, viz (-1/3) (2n + 1) a. write a matlab program in a script file hw6p3a. m that does the following: 1. (4 pts) determines the value of the expression above for a given m, entered by the user. use a for loop to determine the value of the expression by adding terms to the sum. ii. (2 pts you should notice that the value of the expression determined by your program approaches the value of pi in matlab as the number of terms increases. create a variable called prec (refers to precision), which refers to the absolute difference between the value of the expression and the value of pi in matlab. iii. (2 pts) use fprintf before the end of the loop to display the results as: for n = 1, value = x. to a precision of x. for n = 2, value = x. to a precision of x. use format i %.15f, $.10e for n, the value of expression, and the precision respectively. iv. (2 pts) use your program with m = 5 and 15. b. (4 pts) modify your program and save it to a new script file hw6p3b. m to terminate the loop once the precision reached a tolerance of 10–5. this can be done using a break statement. deactivate the printing inside the loop, instead, once the loop is terminated, the program must display the last value of the expression and how many passes the program takes to reach this value as a value of x. in xx passes with a precision of x. use format 8.15, %2i, 4.6e for the value of expression, n, and the precision, respectively. (1 pt) run this case with m = 100.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 19:10
The sum of the normal stresses does not change as the stress state rotates through an angle. a)-trune b)- false
Answers: 2
question
Engineering, 04.07.2019 19:20
Acommercial grade cubical freezer, 4 m on a side, has a composite wall consisting of an exterior sheet of 5.0-mm thick plain carbon steel (kst= 60.5 w/m k), an intermediate layer of 100-mm thick polyurethane insulation (kins 0.02 w/m k), and an inner sheet of 5.0- mm thick aluminium alloy (kal polyurethane insulation and both metallic sheets are each characterized by a thermal contact resistance of r 2.5 x 104 m2 k/w. (a) what is the steady-state cooling load that must be maintained by the refrigerator under conditions for which the outer and inner surface temperatures are 25°c and -5°c, respectively? (b) for power saving purpose, which wall material should be increased/reduced in. thickness in order to reduce 50% of the cooling load found in part (a)? redesign the thickness of the proposed material. 177 w/m-k). adhesive interfaces between the q=575.93 w
Answers: 2
question
Engineering, 04.07.2019 19:20
Heat transfer by is the fastest mode of heat transfer that requires no intervening medium. a)-conduction b)-convection c)-radiation d)-conduction and convection
Answers: 1
question
Engineering, 06.07.2019 03:30
The catalogue for a refrigerant 22, four-cylinder, hermetic compressor operating at 29 r/s. a condensing temperature of 40°c and an evaporating temperature of -4°c shows a refrigeration capacity of 115 kw. at this operating point, the motor (its efficiency is 90 percent) draws 34.5 kw. the bore of the cylinders is 87 mm and the piston stroke is 70 mm. the performance data are based on 8°c of sub-cooling of the liquid leaving the condenser. compute (a) the actual volumetric efficiency and (b) the compression efficiency.
Answers: 2
You know the right answer?
Given the expression, viz (-1/3) (2n + 1) a. write a matlab program in a script file hw6p3a. m that...
Questions
question
Mathematics, 30.12.2021 16:20
question
Computers and Technology, 30.12.2021 16:30
Questions on the website: 13722363