1

# THE CODE NEEDS TO BE ON MATLAB 2. Exercise (a) Let's write a script file that...

## Question

###### THE CODE NEEDS TO BE ON MATLAB 2. Exercise (a) Let's write a script file that...

THE CODE NEEDS TO BE ON MATLAB 2. Exercise (a) Let's write a script file that calculates exp(2) by a Maclaurin series using a while loop exp x )=-+-+-+-+ The while loop should add each of the series terms. The program error as defined below is smaller than 0.01. Error is the exact value (i.e. exp(2)), minus the approximate value (i.e., the current series sum) should exit the loop when the absolute absolute error-lexact-approx Use fprintf within the loop such that, during each round of iteration, the number of iteration, current approximation (i.e. sum of series), and the absolute error are displayed. Also, report exact value once at the end of the program using fprintf. You can use built-in functions like factorial) and abs() The displayed result may look like the following lab8 4 iter- approx- 1.000, error 6.389 ter= 2, . (more lines like the above) exact value- (b) If you integrate cos(t) from t-0 to t-b, for what value of b does the integral become 0.5? You can refer to the program on the previous page. Use a while loop to stop iteration when the integral is 0.5 or above. Generate a text output on screen that reports the upper limit b and the integral.

#### Similar Solved Questions

##### You have just been hired by FAB Corporation, the manufacturer of a revolutionary new garage door...
You have just been hired by FAB Corporation, the manufacturer of a revolutionary new garage door opening device. The president has asked that you review the company's costing system and do what you can to help us get better control of our manufacturing overhead costs." You find that the comp...
##### Suppose that all consumers view red pencils and blue pencils as perfect substitutes. Suppose that the...
Suppose that all consumers view red pencils and blue pencils as perfect substitutes. Suppose that the supply curve for red pencils is upward sloping. Let the price of red pencils and blue pencils be pr and pb. What would happen if the government put a tax only on red pencils?...
##### You have two samples of egg whites. The first sample is mixed with a bit of...
You have two samples of egg whites. The first sample is mixed with a bit of table salt and the second sample is mixed with a bit of white vinegar. Now both samples are placed in a frying pan. Would the samples cook faster than just egg whites themselves? If so, explain the chemistry behind it....
##### Chubbs Inc's manufacturing overhead budget for the first quarter of 2020 contained the following data. Variable...
Chubbs Inc's manufacturing overhead budget for the first quarter of 2020 contained the following data. Variable Costs Fixed Costs Indirect materials \$11300 Supervisory salaries \$37,000 Indirect labor 10,800 Depreciation 6,000 Property taxes and insurance Utilities 7,200 7,400 Maintenance 5,900 M...
##### 2. Let Xi, X2, and X represent the times necessary to perform three successive repair tasks...
2. Let Xi, X2, and X represent the times necessary to perform three successive repair tasks at a certain service facility. Suppose they are independent normal random variables with expected values μι μ2, and ,13 and variances σ σ and σ3 respectively. a. If,-μ2-13-65 a...
##### Supply the missing nuclear symbol in each of the following equations for bombardment reactions. a. ?...
Supply the missing nuclear symbol in each of the following equations for bombardment reactions. a. ? + ^4_2 alpha rightarrow 6250_99 Es + ^3_1 H b. ^14_7 N + ^4_2 alpha rightarrow ? + H c. ^12_6 C + ^2_1 H rightarrow ^13_7 N + ? d. ^27_13 Al + ? rightarrow ^30_15 P + ^1_0 n...
##### 5.3.21 trial repeated n times. Use the binomial probablity formulia to fnd the probebilty of x...
5.3.21 trial repeated n times. Use the binomial probablity formulia to fnd the probebilty of x successes alven the probability p of success on a singls trial Assume that a procedure ylelds a binomial distribution witha P)Round to three decimal places as needed )...
##### 1. The probability that Justin will play golf today is 60%, the probability that he will...
1. The probability that Justin will play golf today is 60%, the probability that he will play golf tomorrow is 75%, and the probability that he will play golf on both days is 50%. What is the probability that he does not play golf on either day? 2. If 28% of the population of Statesville wears conta...
##### ССП B) security analysis 16) The efficient market hypothesis suggests that A) active portfolio management strategies...
ССП B) security analysis 16) The efficient market hypothesis suggests that A) active portfolio management strategies are the most appropriate investment strategies B) a bottom-up approach is the most appropriate investment strategy either active or passive strategies may be appropr...
##### How do you find the x and y intercept given (4, -2), (5, -4)?
How do you find the x and y intercept given (4, -2), (5, -4)?...
##### PART I – SQL Data Control Language and Views: The users of the Medical database include...
PART I – SQL Data Control Language and Views: The users of the Medical database include three nurses (nurse_1, nurse_2, and nurse_3), three physicians (doc_1, doc_2, and doc_3), and one manager (manager_1), all of whom have been created by the DBA. You are asked to use SQL to create necessary ...