Question 1. (total = 10%) Pretend that the function diff does not exist. Implement the function...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 1. (total = 10%) Pretend that the function diff does not exist. Implement the function on your own in a script file. Make the solution generic for any input vector. You own a computer store that sells laptops of various brands. You are considering giving a 10% discount on the current prices. However, you are worried that if you give the discount you will lose in terms of revenue. You asked a forecasting firm to predict the next month's sales (in quantity) with and without the discount. Using the data below, compute the revenues with and without discount, and decide if you will proceed with the discount. You must use vector and/or matrix operations in the solution. a. b. The script should print the revenue before & after and print a Boolean true (1) or false (0) for whether you will give discount or not that will be computed for the specific input. You may solve for the specific example below. Here is the data you need for the analysis: Prices: Brand P&H CAM LLED Microhard Forecasted quantities: Brand P&H CAM LLED Microhard Price Before Discount 1000 1200 1100 1400 Quantities before Discount 50 100 120 30 Quantities after Discount 55 110 125 50 Question 1. (total = 10%) Implement a function that shifts a given vector to the right by k. For example, for the vector [1, 2, 3, 4] the result for k=1 would be [4, 1, 2, 3] and for k=2 would be [3, 4, 1, 2] (every element shifts to the right k times, if the right boundary is reached the elements go to the left side of the vector). The function (or script) should take a vector and a value of k and return the shifted vector. In your solution, you may not apply the built-in function circshift that shifts arrays in MATLAB, but you can debug your code using that function. You own a computer store that sells laptops of various brands. You are considering giving a 10% discount on the current prices. However, you are worried that if you give the discount you will lose in terms of revenue. You asked a forecasting firm to predict the next month's sales (in quantity) with and without the discount. Using the data below, compute the revenues with and without discount, and decide if you will proceed with the discount. You must use vector and/or matrix operations in the solution. a. b. The script should print the revenue before & after and print a Boolean true (1) or false (0) for whether you will give discount or not that will be computed for the specific input. You may solve for the specific example below. Here is the data you need for the analysis: Prices: Brand P&H CAM LLED Microhard Forecasted quantities: Brand P&H CAM LLED Microhard Price Before Discount 1000 1200 1100 1400 Quantities before Discount 50 100 120 30 Quantities after Discount 51 105 122 35 Question 1. (total = 10%) Pretend that the function diff does not exist. Implement the function on your own in a script file. Make the solution generic for any input vector. You own a computer store that sells laptops of various brands. You are considering giving a 10% discount on the current prices. However, you are worried that if you give the discount you will lose in terms of revenue. You asked a forecasting firm to predict the next month's sales (in quantity) with and without the discount. Using the data below, compute the revenues with and without discount, and decide if you will proceed with the discount. You must use vector and/or matrix operations in the solution. a. b. The script should print the revenue before & after and print a Boolean true (1) or false (0) for whether you will give discount or not that will be computed for the specific input. You may solve for the specific example below. Here is the data you need for the analysis: Prices: Brand P&H CAM LLED Microhard Forecasted quantities: Brand P&H CAM LLED Microhard Price Before Discount 1000 1200 1100 1400 Quantities before Discount 50 100 120 30 Quantities after Discount 55 110 125 50 Question 1. (total = 10%) Implement a function that shifts a given vector to the right by k. For example, for the vector [1, 2, 3, 4] the result for k=1 would be [4, 1, 2, 3] and for k=2 would be [3, 4, 1, 2] (every element shifts to the right k times, if the right boundary is reached the elements go to the left side of the vector). The function (or script) should take a vector and a value of k and return the shifted vector. In your solution, you may not apply the built-in function circshift that shifts arrays in MATLAB, but you can debug your code using that function. You own a computer store that sells laptops of various brands. You are considering giving a 10% discount on the current prices. However, you are worried that if you give the discount you will lose in terms of revenue. You asked a forecasting firm to predict the next month's sales (in quantity) with and without the discount. Using the data below, compute the revenues with and without discount, and decide if you will proceed with the discount. You must use vector and/or matrix operations in the solution. a. b. The script should print the revenue before & after and print a Boolean true (1) or false (0) for whether you will give discount or not that will be computed for the specific input. You may solve for the specific example below. Here is the data you need for the analysis: Prices: Brand P&H CAM LLED Microhard Forecasted quantities: Brand P&H CAM LLED Microhard Price Before Discount 1000 1200 1100 1400 Quantities before Discount 50 100 120 30 Quantities after Discount 51 105 122 35
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Prove that e is an irrational number using the following argument by contradiction. Suppose that e = M/N, where M, N are nonzero integers. (a) Show that M!e- is a whole number. (b) Use the power...
-
Home Value Stores operates 264 membership warehouse stores in the United States, Europe, and Asia. The company offers low prices on a limited selection of household and grocery products. In the past...
-
Continental Products Corporation participates in a highly competitive industry. In order to meet this competition and achieve profit goals, the company has chosen the decentralized form of...
-
Mr. Jenkins, this is typical question: Do you feel that I have treated you fairly in this interview?
-
The Edelman Gem Company, a small jewelry manufacturer, has been successful and has enjoyed a good growth trend. Now Edelman is planning to go public with an issue of common stock , and it faces the...
-
The wave function associated with standing waves established in a 5.00 m long light-weight rope is y = 0.00300 sin(x)cos(110t) where x and y are in meters and t is in seconds. (a) How many...
-
Myles Etter and Crystal Santori are partners who share in the income equally and have capital balances of $210,000 and $62,500, respectively. Etter, with the consent of Santori, sells one-third of...
-
Suppose investor A invests $300,000 in a 70%/30%; and investor B invests $300,000 in a 90%/10% according to the way in which you have stated in 1A) above in the context of CAPM, would you say they...
-
Managers are increasingly seeing the benefits of emerging countries as the next frontier for potential future growth prospects as mature markets become more saturated. As these markets are...
-
Information & education instruments aim to correct market failures ... Points: 1 Related to the information gap that exists and which prevents individuals from making environmentally informed choices...
-
What differences might you expect to find in the corporate cultures of a 100-year-old manufacturing firm based in Winnipeg and a 5-year-old e-commerce firm based in Ottawa?
-
Which modality interests you? Why does it interest you? What kind of patient conditions and disease processes are referred to your imaging modality? What are the educational, training & licensure...
-
What would happen if you had no disposable income? Explain
-
The constant Ao value is equal to * 0.01 maximum power density (in watts per square meter) at a distance of 4Km is equal to 25x10^-8 Max. directivity of the antenna is * 0.06 The total antenna...
-
The relationship described in question 7 does not always appear to hold. What factors, besides the number of firms in the market, might affect margins?
-
The Sierpinski triangle can be implemented in MAILAB by plotting points iteratively according to one of the following three rules that are selected randomly with equal probability. Rule 1: xn+1 =...
-
Create the following matrix by typing one command. Do not type individual elements explicitly. E=100000 00 5 4 3 0021
-
The growth of a fish is often modeled by the von Bertalanffy growth model: dw/dt = aw2/3 - bw where w is the weight and a and b are constants. Solve the equation for w for the case a = 5/b1/3, b = 2...
-
A first-order dynamic system is modeled as \[\dot{y}+3 y=f(t), y(0)=1\] Assuming the input \(f(t)\) is a step function with magnitude 0.8 , find \(y_{s s}\).
-
The nonlinear state-variable equations for a dynamic system are derived as Plot \(x_{1}(t)\) versus \(0 \leq t \leq 10\) by a. Using the RK4 method. b. Simulating the Simulink model of the system. [...
-
Draw the Bode plot and identify the corner frequency, as well as the asymptotic approximations of magnitude for low-frequency and high-frequency ranges. \(G(s)=\frac{4}{3 s+\frac{2}{3}}\)
Study smarter with the SolutionInn App