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 18:10
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 19:10
What is the major difference between thermoplastics and thermosetting plastics from the polymerization structure point of view?
Answers: 2
question
Engineering, 04.07.2019 19:20
Ashielded metal arc-welding operation is accomplished in a work cell by a fitter and a welder. the fitter takes 5.5 min to load components into the welding fixture at the beginning of the work cycle, and 1.5 min to unload the completed weldment at the end of the cycle. the total ength of the weld seams 1200 mm, and the travel speed used by the welder averages 300 mm/min. every 600 mm of seam length, the welding stick must be changed, which takes 0.8 min. while the fitter is working, the welder is idle (resting): and while the welder is working the fitter is idle. (a) determine the average arc-on time as a fraction of the work cycle time. (b) how much improvement in arc-on time would result if the welder used flux-cored arc welding (manually operated), given that the spool of weld wire must be changed every 10 weldments, and it takes the welder 5.0 min to accomplish the change? (c) what are the production rates for these two cases (weldments completed per hour)? attach your work and solutions.
Answers: 1
question
Engineering, 06.07.2019 03:20
1kg of water contained in a piston-cylinder assembly undergoes two processes in series from an initial state where the pressure is 3.0 bar and the temperature is 150°c process 1-2: the water is compressed isothermally to a volume of 0.25 m^3 with 120 kj of work being done to the system. process 2-3: the water is heated at constant volume to a final pressure of 10 bar. a. find the change in internal energy for the system. b. calculate the amount of heat transferred, in kj. c. sketch both processes on a t-v diagram. (196.33 kj/kg, 76.33 kj)
Answers: 1
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
Spanish, 01.02.2021 22:20
question
Mathematics, 01.02.2021 22:20
question
Mathematics, 01.02.2021 22:20
question
Spanish, 01.02.2021 22:20
question
Mathematics, 01.02.2021 22:20
question
Social Studies, 01.02.2021 22:20
question
Mathematics, 01.02.2021 22:30
Questions on the website: 13722367