1. Creating a user-defined function Write a user-defined MATLAB function named PBTask4p1_f.m for the following math...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Creating a user-defined function Write a user-defined MATLAB function named PBTask4p1_f.m for the following math function with x the input argument and y the output: y(x)=0.8x-13x-5x The function should work for x being a scalar or a vector. Write a script file named PBTask4p1.m to a) Use the function to calculate y(-5) and y(4) and display the results in command window b) Use the function to make a plot of the function y(x) for -5 x 5. Label the x-axis and y-axis of the plot like the one as follows. 200 Aandino 150 100 0 50 -100 Input x 1. Creating a user-defined function Write a user-defined MATLAB function named PBTask4p1_f.m for the following math function with x the input argument and y the output: y(x)=0.8x-13x-5x The function should work for x being a scalar or a vector. Write a script file named PBTask4p1.m to a) Use the function to calculate y(-5) and y(4) and display the results in command window b) Use the function to make a plot of the function y(x) for -5 x 5. Label the x-axis and y-axis of the plot like the one as follows. 200 Aandino 150 100 0 50 -100 Input x
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Use the z-score formula, x - z = = and the information below to find the mean, . Round your answer to one decimal place, if necessary. z = 0.75, x = 14.9, and = 4.8
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
How does feedback value relate to predictive ability and accountability?
-
Recognizing that it is very difficult to manufacture a die with a sub millimeter diameter, how w~ you produce a 10-m-diameter wire?
-
Carla was the owner of vacant land that she was holding for investment. She paid $1 million for the land in 2014. Raymond was an investor in vacant land. He thought Carlas land might be the site of...
-
Calculate \(\frac{38}{73}+\frac{7}{73}\).
-
Cylinder Company has two divisions, Glass Division and Instrument Division. For several years, Glass Division has manufactured a special glass container, which it sells to Instrument Division at the...
-
Explain the existing and potential benefits of the application of the Sarbanes-Oxley Act (SOX) as well as inside of the United States and in foreign countries. Sarbanes=Oxley Act at 10 Enhancing the...
-
National City Bank has 665,600,000 shares of common stock outstanding that are currently selling for $32.87 per share on the New York Stock Exchange. If National City's net income was $2,529,280,00...
-
Let f(x)=xe and f(") (x) be the nth derivative of f with respect to x. If f(10)(x)=(x+n) e*, what is the value of n?
-
Walmart is the most common low-active price strategy company. They use this approach to focus on offering everyday low prices. The main advantage of this strategy is that it is simple for the company...
-
Explain how removing water would affect the earth in terms of its hydrosphere, biosphere, and society Relate answer to the impacts of removing water by the three points using cause and effect language
-
Use in calculating NPV for a cash inflow project: The management of Fine Electronics Company is considering to purchase an equipment to be attached with the main manufacturing machine. The equipment...
-
If I keep 6 0 0 shares of Peloton and sold them at a later date, November 1 4 th 2 0 2 2 how much would I have gained or lost by holding onto the shares until that date? Show calculations
-
MGT 2700 Assignment 3-Research Skills Demonstration This assignment will involve an applied research exercise that relates to the course materials and the academic research process. Students will...
-
Find the numerical value of each expression. (a) sech 0 (b) cosh -1 1
-
Determine the positive roots of the equation x2- 5x sin(3x) + 3 = 0.
-
An isolated prime is a prime number p such that neither p - 2 nor p + 2 is prime. For example, 47 is an isolated prime since 45 and 49 are both not primes. Write a computer program that finds all the...
-
The formula for changing the base of a logarithm is: logaN = logbN/logba (a) Use MATLAB's function log (x) to calculate log4 0.085. (b) Use MATLAB's function logl0 (x) to calculate log61500.
-
During 1998, the Senbet Discount Tire Company had gross sales of \($1\) million. The firms cost of goods sold and selling expenses were \($300,000\) and \($200,000,\) respectively. These figures do...
-
Ritter Corporations accountants prepared the following financial statements for year-end 20X2. a. Determine the change in net working capital in 20X2. b. Determine the cash flow during the year 20X2....
-
The following trial balance of X Limited, a non-listed company, has been extracted from the books after the preparation of the profit and loss account and various transfers from profit and loss for...
Study smarter with the SolutionInn App