Using the MATLAB Help menu, discuss how the following functions are used. Create a simple example and demonstrate the proper use of the function.

a. ABS (X)
b. TIC, TOC
c. SIZE (x)
d. FIX (x)
e. FLOOR (x)
f. CEIL (x)
g. CALENDAR


a. ABS (X)
ABS(X) is the absolute value of the elements of X.
Example: abs(-4), ans = 4
b. TIC, TOC
TIC Start a stopwatch timer. The sequence of commands
TIC, operation, TOC prints the number of seconds required for the operation.
c. SIZE (x)
D = SIZE(X), for M-by-N matrix X, returns the two-element
row vector D = [M, N] containing the number of rows and columns in the matrix.
Example: x=[1 2 4;-1 0 1], d=size(x), d = 2 3
d. FIX (x)
FIX(X) rounds the elements of X to the nearest integers towards zero.
Example: fix(1.56), ans =1
e. FLOOR (x)
FLOOR(X) rounds the elements of X to the nearest integers towards minus infinity
Example: floor (-1.56), ans = -2
f. CEIL (x)
CEIL(X) rounds the elements of X to the nearest integers towards infinity.
Example: ceil(1.56), ans = 2
g. CALENDAR
CALENDAR or CALENDAR(DATE) or CALENDAR(YEAR,MONTH)
is a 6-by-7 matrix containing a calendar for the current or specified month.
The first column of the returned matrix corresponds to Sunday.

Trades & Technology

You might also like to view...

The design wind speed for an average -risk building at a location has a probability of occurrence of ______.

A) once in 200 years. B) once in 100 years. C) once in 300 years. D) once in 50 years. E) none of the above.

Trades & Technology

A crystal might also vibrate at a frequency that’s a multiple of its fundamental frequency, which is called a ____ frequency, or overtone.

a. harmonic b. secondary c. primary d. serial

Trades & Technology

At ____ year(s) of age, all the temporary incisors are visible from the front, and the first molar should be present.

A. 1 B. 2 C. 3 D. 4

Trades & Technology

____________________ brushing is recommended to remove dead hair and distribute the skin's oils

Fill in the blank(s) with correct word

Trades & Technology