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...
-
1. At the senior management level, you get hired for competence. You get fired for personality. In your opinion, is this statement true or false? How does it relate to Barry Carver and his current...
-
For the fan of both Examples 5.19 and 5.28 discuss what fluid flow properties you would need to measure to estimate fan efficiency. Example 5.1 A great danger to workers in confined spaces involves...
-
Presented below are the components in Veasy Company's income statement. Determine the missing amounts. Sales Revenue (a) 75,000 (b) $108,000 Cost of Goods Sold Gross Profit $28,000 Operating Expenses...
-
What is "mirroring"? Explain and Provide real time examples and reference.
-
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)
-
Walker Shuttle Service, Inc., is considering whether to purchase an additional shuttle van. The van would cost $36,000 and have a zero salvage value . It would enable the company to increase net...
-
A company bought a new machine for its warehouse on January 1: Paid $10,000 in cash Financed the rest of the purchase price via a $30,000 5-year note Incurred a separate $2,000 setup charge Monthly...
-
A linear elastic spring can be compressed 10.0 cm by an applied force of 5.0 N. A 4.5 kg crate of apples, moving at 2.0 m/s, collides with this spring, as shown. What will be the maximum compression...
-
3. a) Calculate multiple linear Equation and show value of estimated coefficients. 1 234 5 X1 25 30 20 35 28 X2 15 20 18 22 17 X3 20 15 25 22 18 Y 350 420 310 460 380 b) Calculate the adjusted...
-
Consider the above topology figure, with each link cost (as standard for RIP) is 1. Assume that initially the routing is converged (everything is calculated correctly) and no link is failed. 1.1....
-
Write down the dynamic programming recursion that characterizes the optimal behavior of an unemployed worker. Be specific about he assumptions you are making in writing this recursion (and justify...
-
Differentiate the following terms/concepts: a. Prospect and probability distribution b. Risk and uncertainty c. Utility function and expected utility d. Risk aversion, risk seeking, and risk...
-
The 2017 financial statements of the U.S. government are available at: https://www.fiscal.treasury.gov/fsreports/rpt/finrep/fr/fr_index.htm Use these to answer the following questions: a. Statement...
-
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...
-
In a multi-product break-even analysis, we use a blended or weighted average contribution margin. Why must we use this "fictitious" number rather than actual contribution margins in computing a...
-
What are the Ethical Considerations for remuneration approaches? Do you agree with the excessive CEO compensation? Please provide an example and justify your answer. Define restricted stocks. Provide...
-
How is Islamic banking different from Conventional banking? Please provide an example. Explain the main products offered by the Islamic Banks. provide some examples.
Study smarter with the SolutionInn App