Problem

Develop an M-file function called rounder to round a number x to a specified number of dec...

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 dec­imal digits: x = 477.9587, –477.9587, 0.125, 0.135, –0.125, and –0.135.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 3