MATLAB The function f (x) = ln(x) is defined over the real numbers (R) for x =
Fantastic news! We've Found the answer you've been seeking!
Question:
MATLAB
Transcribed Image Text:
The function f (x) = ln(x) is defined over the real numbers (R¹) for x = (0, ∞) (though MATLAB will report ln (0) as - Inf). Use an if selection structure to check in the inputted value of x is in the domain of f(x) according to these three cases: Case 1: If the inputted x is not in the domain of ƒ(x) (i.e. if x = (-∞, 0]), use the error command to print an error message to the Command Window. Case 2: If the inputted x is on the domain (0, 1), use the warning command to print a warning to the Command Window stating that the value of f(x) will be less than 0. Case 3: If the inputted x is in the domain [1, ∞) then calculate and print to the Command Window the value of f(x). Hint: What are the branches in this selection structure? Identify them first, then begin to program the cases. NB: The symbol E is a mathematical symbol that can be interpreted in English as "is an element of." For example, if x = [0, 5] then x is defined within (or "belongs to") that range of numbers. You will likely recall from calculus that parentheses indicate a specific interval does not include the end-point (a so- called "open interval"), while brackets indicate that the interval does include the end point (a so-called "closed interval"). The function f (x) = ln(x) is defined over the real numbers (R¹) for x = (0, ∞) (though MATLAB will report ln (0) as - Inf). Use an if selection structure to check in the inputted value of x is in the domain of f(x) according to these three cases: Case 1: If the inputted x is not in the domain of ƒ(x) (i.e. if x = (-∞, 0]), use the error command to print an error message to the Command Window. Case 2: If the inputted x is on the domain (0, 1), use the warning command to print a warning to the Command Window stating that the value of f(x) will be less than 0. Case 3: If the inputted x is in the domain [1, ∞) then calculate and print to the Command Window the value of f(x). Hint: What are the branches in this selection structure? Identify them first, then begin to program the cases. NB: The symbol E is a mathematical symbol that can be interpreted in English as "is an element of." For example, if x = [0, 5] then x is defined within (or "belongs to") that range of numbers. You will likely recall from calculus that parentheses indicate a specific interval does not include the end-point (a so- called "open interval"), while brackets indicate that the interval does include the end point (a so-called "closed interval").
Expert Answer:
Answer rating: 100% (QA)
Get user input for the value of x x inputEnter a value for x Check if x is i... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these electrical engineering questions
-
Redo Problem 11 using MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.8 damping ratio line. You will interactively select the...
-
Redo Problem 19 using a lag-lead compensator and MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.5 damping-ratio line. You will...
-
Redo Problem 6 using MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.707 damping ratio line. You will interactively select the...
-
Which one of the following statements related to investigations of workplace harassment complaints under Ontario's OHSA is true? a) As a rule, such investigations should be completed with 120 days of...
-
If the inflation rate is 7% per year, how many years will it take for the cost of something to double when prices increase at exactly the same rate as inflation?
-
Consider a tree T storing 100,000 entries. What is the worst-case height of T in the following cases? a. T is a binary search tree. b. T is an AVL tree. c. T is a splay tree. d. T is a (2,4) tree. e....
-
Owens-Illinois, Inc. has preferred stock outstanding. 1. Give the basic equation to compute earnings per share of common stock for net income. 2. List all the income items for which Owens-Illinois...
-
Reformulate the following balance sheet and income statement for a manufacturing concern. Amounts are in millions. The firm bears a 36 percent statutory taxrate. Balance Sheet Assets Operating cash...
-
Question Three. Find the values of k and m that will make the following function continuous every- sinkx, if x 1 where. f(x)=-m, if 1 6.
-
Consider Coral Bay Hospital. If the initial building and equipment cost changes to $25,000,000, the MIRR will 1. Increase 2. decrease Consider Coral Bay Hospital. If the land salvage value is changed...
-
An annual coupon bond has coupon payment = $500, YTM = 8%, and maturity = 5 years.If the price ofthe bond is $9,400, what must be the face value?
-
Samuel's gross pay for the week was $1,617. Payroll data for the current week are as follows: federal income tax withheld, $296; social security tax rate, 6.0%; and Medicare tax rate, 1.5%. What is...
-
If a blackbody increases temperature by a factor of 1 . 3 , how much does the flux increase by ?
-
A train 4 0 0 m long is moving on a straight track with a speed of 8 1 . 2 km / h . The engineer applies the brakes at a crossing, and later the last car passes the crossing with a speed of 1 5 . 8...
-
Given the data below answer the question. Issuing Company Fair Value Bernard Co. $34,650 Chadwick Co. 57,960 Gozar Inc. 98,560 Nightline Co. 39,200 For the year ending December 31, 2015, O'Brien...
-
Describe the interplay between metabolic pathways and signal transduction. How do signaling molecules like AMP-activated protein kinase (AMPK) and mTOR influence metabolic pathways ?
-
Make the following assumptions: (i) client and server are connected by a direct link, whose transmission rate is R, (ii) round-trip time (RTT) between client and server is denoted by T. (iii) the...
-
What are current assets and current liabilities? How are they different from non-current assets and non-current liabilities?
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
In the 2012 tax year, Michelle paid the following amounts relating to her 2010 tax return: Tax deficiency..........................................$5,000 Negligence...
-
Karim Depak received a Form 1099-B showing the following stock transactions and basis during 2012: None of the stock is qualified small business stock. Calculate Karim's net capital gain or loss...
-
The following MINITAB output presents a multiple regression equation y = b0 + b1x1 + b2x2 + b3x3 + b4x4. It is desired to drop one of the explanatory variables. Which of the following is the most...
-
For a sample of size n = 15, the following values were obtained: b0 = 3.71, b1 = 8.38, se = 1.13, (x x)2 = 7.71, x = 13.16. Construct a 95% prediction interval for an individual response when x = 8.
-
A _______________ interval estimates the y-value for a particular individual with a given x-value. In Exercises 3 and 4, fill in each blank with the appropriate word or phrase.
Study smarter with the SolutionInn App