Write a script le using conditional statements to evaluate the following function, assuming that the scalar variable
Question:
Write a script le using conditional statements to evaluate the following function, assuming that the scalar variable x has a value. The function is
Y = ex+1 for x < -1, y = 2 + cos(πx) for -1 ≤ x ≤ 5, and y = 10(x - 5) + 1 for x ≥ 5. Use your le to evaluate y for x = -5, x = 3, and x = 15, and check the results by hand.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 46% (13 reviews)
Matlab script file for following function is to evaluate x 5 x 5 if x 1 y expx 1 elseif ...View the full answer
Answered By
Umair Expert
Hi Everyone.
I have 6 years of teaching experience.
I am serving as a tutor 2 more websites.
I will provide you projects and solutions of questions related to any subject.
I am a good programmer.(PHP, Python)
I am good command in mathematics.
I am here to assist you.
I'll be very happy to work with you...
Thanks dear..
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Engineering questions
-
Write a script le to simulate 100 plays of a game in which you ip two coins. You win the game if you get two heads, lose if you get two tails, and ip again if you get one head and one tail. Create...
-
Write a script le to play a simple number guessing game as follows. The script should generate a random integer in the range 1, 2, 3, . . . , 14, 15. It should provide for the player to make repeated...
-
The capacitance of two parallel conductors of length L and radius r, separated by a distance d in air, is given by where is the permittivity of air ( = 8.854 10 -12 F/m). Write a script le that...
-
Panettones are fluffy dome-shaped Italian cakes popular during the holiday season. For Balucis Bakery in Milan, sales of panettones in December account for 50% of its income for the year. The bakery...
-
Calculate the percent ionization of hydrazoic acid (HN3) in solutions of each of the following concentrations (Ka is given in Appendix D): (a) 0.400 M, (b) 0.100 M, (c) 0.0400 M.
-
Organization: Olive Garden Restaurant Web site: www.olivegarden.com Summary: The Olive Garden is a multiunit chain that primarily serves exquisite Italian food. It is currently operated by Darden...
-
System approach to management: expands on the previous principle in that achieving any objective requires a system of interrelated processes? LO.1
-
The plane wall with constant properties and no internal heat generation shown in the figure is initially at a uniform temperature T i Suddenly the surface at x = L is heated by a fluid at T having a...
-
1. Show that if the x-intercept and y-intercept of a line are non-zero numbers a and b, then the equation of the line can be written in the form + = 1. estion 1 charge for common stock to open a new...
-
A young couple has $5,000 to invest in either savings bonds or a real estate deal. The expected return on each investment, given good and bad economic conditions, is shown in the following payoff...
-
Are these following expressions equivalent? Use MATLAB to check your answer for specific values of a, b, c, and d. a. 1. (a == b) & ((b == c)|(a == c)) 2. (a == b)|((b == c)&(a == c)) b. 1. (a <...
-
Rewrite the following statements to use only one if statement. if x < y if z < 10 w = x*y*z end end
-
For (x) = 3x and g(x) = [1/4] x , find each of the following. Round answers to the nearest thousandth as needed. (-2)
-
Let two planes be given by 2x-y+z = 8 and z = x+y-5 (a) Find the angle between the two planes. Leave your answer in degrees and round to the nearest tenth. (b) Find the vector equation of the line of...
-
9-2. The profile of a gear tooth shown in Fig. P9.2 is approximated by the trigonometric equation y(x) = a. Estimate the area A using eight rectangles of equal width A x = 1/8, b. Calculate the exact...
-
tube is hinged to a rotating base as shown in Fig. 4. At the instant shown, the base rotates about the z axis with a constant angular velocity ! 1 = 2 rad/s. At the same instant, the 2 tube rotates...
-
Find the limit analytically. -7x2+5x-10 lim 0 9x+13x+11 Find the limit analytically. lim +80 4x-13 5x+6x-11
-
Write a recursive function for the running time T(n) of the function given below. Prove using the iterative method that T(n) = (n). function( int n) { if(n=1) return; for(int i = 1; i
-
What is the total for consolidation inventory? Alpha Company Owns 80 percent of the voting stock of beta Company. Alpha and Beta reported the following account information from their year-end...
-
A parking lot charges $3 for the first hour (or part of an hour) and $2 for each succeeding hour (or part), up to a daily maximum of $10. (a) Sketch a graph of the cost of parking at this lot as a...
-
Figure shows an example of a hydraulic accumulator, which is a device for reducing pressure fluctuations in a hydraulic line or pipe. The fluid density is (, the plate mass is m, and the plate area...
-
Design a hydraulic accumulator of the type shown in Figure. The liquid volume in the accumulator should increase by 30in.3 when the pressure p increases by 1.5 lb/in.2. Determine suitable values for...
-
Consider the liquid-level system treated in Example 7.4.10 and shown in Figure 1 A.M. The pump curve and the line for the steady-state flow through both valves are shown in Figure. It is known that...
-
please help Problem 13-7 (Algo) Prepare a Statement of Cash Flows [LO13-1, LO13-2] [The following information applies to the questions displayed below.] Comparative financial statements for Weaver...
-
A firm has 1000 shareholders, each of whom own $59 in shares. The firm uses $28000 to repurchase shares. What percentage of the firm did each of the remaining shareholders own before the repurchase,...
-
Vancouver Bank agrees to lend $ 180,000 to Surrey Corp. on November 1, 2020 and the company signs a six-month, 6% note maturing on May 1, 2021. Surrey Corp. follows IFRS and has a December 31 fiscal...
Study smarter with the SolutionInn App