Develop an M-file function called rounder to round a number x to a specified number of decimal
Question:
Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function should be set up as
function xr = rounder(x, n)
Test the program by rounding each of the following to 2 decimal digits: x = 477.9587, − 477.9587, 0.125, 0.135, − 0.125, and − 0.135.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (4 reviews)
Heres the Mfile function called rounder that rounds a number x to a specified num...View the full answer
Answered By
Aricayos Apple
I'm a highly professional tutor and academic freelancer , with over 5 years of experience. I became one of best tutors in Chegg tutoring community and Course Hero having high helpful rate. I love helping students understand Business courses related, as it is my passion to tutor and and help students understand these amazing subjects as attached in my skills. I am also an expert on the subject of history related subjects since at one point had handled these subjects. I also have a bachelor's degree in bachelors of science in Business Administration from City of Malabon University in Philippines. I am currently working on getting a master's degree in the field Business Administration from City of Malabon University. Meanwhile, you can learn how to solve complex problems consistently with me.
0.00
0 Reviews
10+ Question Solved
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted:
Students also viewed these Mathematics questions
-
Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function should be set up as function nd = days(mo, da, leap) where mo...
-
Develop a well-structured function to determine the elapsed days in a year. The first line of the function should be set up as function nd = days(mo, da, year) where mo = the month (1-12), da = the...
-
The following text talks about how the Expenditure cycle works in an organization The expenditure cycle is a recurring set of business activities and related information processing operations...
-
Let B > 0. Show that the maximum of (x 1 , . . . , x n ) = x 1 + + x n subject to x 2 1 + + x 2 n = B 2 is nB. Conclude that for all numbers a,..., an lal++lanl n(a + + a) / 1/2
-
In Problem 13.6 on page 470, you used the total worldwide revenue ($ millions) and full time voluntary turnover (%) stored in BestCompanies to predict the number of full time jobs added. a. Perform a...
-
Under what circumstances is the units-of-production method of depreciation especially desirable?
-
The Arizona Corporation reported positive net income but negative cash flow from operations. Further, despite the negative cash flow from operations, the company continued to pay its regular dividend...
-
Following are five graphs representing various cost behaviors. (1) Identify whether the cost behavior in each graph is mixed, step-wise, fixed, variable, or curvilinear. (2) identify the graph (by...
-
Problem 23-4A (Algo) Pricing using total cost, target cost, and variable cost LO P6 Techcom is designing a new smartphone. Each unit of this new phone will require $233 of direct materials; $13 of...
-
Develop an M-file function to determine the elapsed days in a year. The first line of the function should be set up as function nd = days(mo, da, year) where mo = the month (112), da = the day (131),...
-
The derivative of f (x) = 1/(1 3x 2 ) is given by Do you expect to have difficulties evaluating this function at x = 0.577? Try it using 3- and 4-digit arithmetic with chopping. 6 (1 - 3x)
-
The finite element method is a. an approximate analytical method b. a numerical method c. an exact analytical method
-
Random Inc. Cost data for the last 3 years Overhead Costs Units Produced January-20 $78,000 5,679 February-20 $91,000 6,751 March-20 $100,000 7,539 April-20 $78,000 5,335 May-20 $89,000 6,480 June-20...
-
Winnie Leigh started a resort business, Winnie's Resort, on June 1, 2023. The following transactions took place during the first quarter of business, June 1 - August 31, 2023. 1. Winnie invested...
-
On January 1, 2021, Ravetch Corporation's projected benefit obligation was $55 million. During 2021, pension benefits paid by the trustee were $5 million. Service cost for 2021 Is $15 million....
-
Here are some important figures from the budget of Cornell, Inc., for the second quarter of 2020: Credit sales Credit purchases April $321,000 May June $301,000 $361,000 129,000 152,000 177,000 Cash...
-
WONDER Ltd maker of quality pens has experienced a steady growth in sales for the past five years. However, increased competition has led the Managing Director of WONDER Ltd to believe that an...
-
Consider a situation in which two processors in an SMP configuration, over time, require access to the same line of data from main memory. Both processors have a cache and use the MESI protocol....
-
Find the numerical value of each expression. (a) sech 0 (b) cosh -1 1
-
A total charge Q is uniformly distributed around a ring-shaped conductor with radius ?. A charge q is located at a distance x from the center of the ring (Figure). The force exerted on the charge by...
-
Figure shows a circuit with a resistor, an inductor, and a capacitor in parallel. Kirchhoff?s rules can be used to express the impedance of the system as Where Z = impedance (?) and ? = the angular...
-
For fluid flow in pipes, friction is described by a dimensionless number, the Fanning friction factor . The Fanning friction factor is dependent on a number of parameter related to the size of the...
-
Security market line) James Fromholtz is considering whether to invest in a newly formed investment fund. The fund's investment objective is to acquire home hortgage securities at what it hopes will...
-
Problem 9-5 Use the income statement shown next to calculate free cash flow for Rainier Printing for 2021. In addition to the information in the income statement, assume that Rainier had $570,000 in...
-
39. (LO 22.6) Kumar expected his firm to earn $1,000 per year forever, with no growth. Given a cost of capital of 10 percent, the value of the firm is $10,000. Kumar identified a new project, which...
Study smarter with the SolutionInn App