Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This question illustrates the absolute rounding of the built-in MATLAB functions

ID: 3649269 • Letter: T

Question


This question illustrates the absolute rounding of the built-in MATLAB functions floor and ceil.

The following row vector x has been declared at the command prompt:

>> x = [1.501 6.87 4.33 3.499 1.50];

What is the result of the following two function calls?:

>>ceil(x)
>>floor(x)


Answer
a.
The MATLAB functions floor and ceil do not work on vectors
b.
>> 1.510 6.90 4.40 3.500 1.50
>> 1.500 6.80 4.30 3.490 1.50
c.
>> 2 7 5 4 2
>> 1 6 4 3 1
d.
>> 2 7 4.5 3.5 1.50
>> 1.5 7 4.5 3.5 1.5

Explanation / Answer

c. >> 2 7 5 4 2 >> 1 6 4 3 1

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote