Question: MATLAB has a function called round that rounds a number to the nearest integer. As an example, round(4.5) is 5 and round (4.4) is 4.

 MATLAB has a function called round that rounds a number to

MATLAB has a function called round that rounds a number to the nearest integer. As an example, round(4.5) is 5 and round (4.4) is 4. Write a program that calculates the ceiling and floor of a number using the round function. The ceiling rounds towards mo and the floor rounds towards -~0. By hand, draw a flow chart showing what your program will do similar to what we have done in class. Find the ceiling and floor of (a) -5.3 (b) 9.5 (c) 3.49 (d) -6 Solution: (a) ceil: -5, floor: -6 (b) ceil: 10, floor: 9 (C) ceil: 4, floor: 3 (d) ceil: -6, floor: -6 Note: DO NOT use the built-in ceiling and floor functions that MATLAB has

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!