1

MATLAB Write a script without using any loops to calculate e^5 for N = 10 using...

Question

MATLAB Write a script without using any loops to calculate e^5 for N = 10 using...

MATLAB

Write a script without using any loops to calculate e^5 for N = 10 using only array operations and sum() function.

- rn n-0

- rn n-0

Answers

x=5; N=10; arr = ones(1,N+1); prod = 1; for i=0:N     arr(i+1)=x^i/prod;     prod = prod * (i+1); end fprintf("Sum = %d\n",sum(arr));

Output:

Sum = 146.381

Please upvote the solution if it helped. Thanks!

Note: Please comment below if you have any doubts


Similar Solved Questions

1 answers
Write an equation and solve if possible please: 1
Write an equation and solve if possible please:1.) You make 20 silk flower arrangements and plan to sell them at a craft show. Each flower arrangment costs $12 in materials, and your booth at the craft show costd $30. If you sell the arrangments for $24 each, how many must you sell to make at least ...
1 answers
V 1st attempt . See Periodic Table D See Hint Suppose an oven's radiation wavelength is...
V 1st attempt . See Periodic Table D See Hint Suppose an oven's radiation wavelength is 0.125 m. A container with 150.00 g of water was placed in the oven, and the temperature of the water rose from 20.0°C to 80.0°C. How many photons of this microwave radiation were required to heat the ...
1 answers
The distance s that a certain object falls from a height of 450 ft in t...
The distance s that a certain object falls from a height of 450 ft in t seconds is given by the following formula. s = 450 - 16t2 + vt Find s when t = 3 and v = -2. ft SE...
1 answers
The data in the table below represents observed number of leaves on olive trees. 87 87...
The data in the table below represents observed number of leaves on olive trees. 87 87 83 65 79 70 76 79 66 78 73 66 77 78 66 102 84 67 75 Graph a relative frequency histogram (1 point). Choose the variate range wisely....
1 answers
Laughton Landscaping has collected the following data for the December 31 adjusting entries Click the icon...
Laughton Landscaping has collected the following data for the December 31 adjusting entries Click the icon to view the independent cases) Read the ints Requirement 1. Journals the adjusting entry needed on December 31 for each of the tom fecting Laughton Landscaping Asune Laughton records justing en...
1 answers
Exercise 2-1 Compute a Predetermined Overhead Rate [LO2-1] Harris Fabrics computes its plantwide predetermined overhead rate...
Exercise 2-1 Compute a Predetermined Overhead Rate [LO2-1] Harris Fabrics computes its plantwide predetermined overhead rate annually on the basis of direct labor-hours. At the beginning of the year, it estimated that 20,000 direct labor-hours would be required for the period's estimated level o...
1 answers
Please answer with correct answer, 3 sig figs, correct units. Thank you! 슬 loncapa.science.oit.ca Question 1...
Please answer with correct answer, 3 sig figs, correct units. Thank you! 슬 loncapa.science.oit.ca Question 1 Charge Q Point on axis What is the electric potential at the point on the axis which is at x = 3.80 m. The length of the rod is L = 2.00 m and the charge on the rod is Q#2.50 nc. Qu...
1 answers
Why is electrophoresis with hemoglobin component of 86.5% HbS key test for sickle cell anemia? How...
Why is electrophoresis with hemoglobin component of 86.5% HbS key test for sickle cell anemia? How is sickle cell anemia inherited? Why would reticulocyte percentage increase during a sickle cell attack?...
1 answers
An economy has the following data: real GDP $5,177 billion taxes collected by the government $481...
An economy has the following data: real GDP $5,177 billion taxes collected by the government $481 billion government spending $077 billion consumption spending $3,754 billion. If this is a closed economy, what is the value of investment spending? Enter a whole number with no dollar sign and please d...
1 answers
INTRO TO PHYSICS (PHYS 207/20 Cutnell, Physics, 10e Gradebook ORION Downloadable eTextbook ent FULL SCREEN PRINTER...
INTRO TO PHYSICS (PHYS 207/20 Cutnell, Physics, 10e Gradebook ORION Downloadable eTextbook ent FULL SCREEN PRINTER VERSTON BACK NEXT Chapter 01, Problem 22 Your answer is partially correct. Try again. An aerialist on a high platform holds onto a trapeze attached to a makes with the vertical at this ...
1 answers
9. Sunshine Corporation's accounting records include the following items, listed in no particular order, at December...
9. Sunshine Corporation's accounting records include the following items, listed in no particular order, at December 31, 2018: (Click the icon to view the data.) The income tax rate for Sunshine Corporation is 25%. Prepare Sunshine's income statement for the year ended December 31, 2018. Omi...
1 answers
Can someone explain on how to do this problem? Not really sure where to start on...
can someone explain on how to do this problem? Not really sure where to start on how to solve...
1 answers
A National Football League kicker needs to kick a game-winning field goal from a distance of...
A National Football League kicker needs to kick a game-winning field goal from a distance of 45 meters. If the kicker typically kicks the ball with a launch angle of 36.6º, what minimum launch velocity does the kicker need in order for the football to clear the crossbeam of the goalposts 3 mete...
1 answers
Question 2 (18 marks) The purpose of substantive testing is to verify the assertions made by...
Question 2 (18 marks) The purpose of substantive testing is to verify the assertions made by management in the financial statements. Consider the following unrelated audit tests, which a CPA performed for the audit of the financial statements of a client with a fiscal year-end of December 31, 2017. ...
1 answers
In what way was the seed an important adaptation in the evolution of plants? Explain the difference between pollination and fertilization. How much time elapses between these two processes in pin...
In what way was the seed an important adaptation in the evolution of plants? Explain the difference between pollination and fertilization. How much time elapses between these two processes in pine? 1. 2. 3. Outline the main events of the pine life cycle. Where are the gametes produced? Where are the...
1 answers
Could i get the correct answer? 166.8 cm is not correct. A piece of thin spherical...
Could i get the correct answer? 166.8 cm is not correct. A piece of thin spherical shell that has a radius of curvature of 94 cm is silvered on both sides. The concave side of the piece forms a real image 70.5 cm from the mirror. The piece is then turned around so that its convex side faces the obje...
1 answers
The reduction potential for the following non-standard half cell at 298K is ______ volts. F2 (1.54×10-3atm)...
The reduction potential for the following non-standard half cell at 298K is ______ volts. F2 (1.54×10-3atm) + 2e-2F- (1.03M)...

-- 0.057061--