Digital Signal Processing Reference
In-Depth Information
-4
-4
-4
-4
The ceil function, whose name is short for \ceiling," works in a manner opposite
to that of the floor function, giving the integer to the right of the oating-point
number on the number line.
>> ceil([3.01, 3.49, 3.5, 3.99])
ans =
4
4
4
4
>> ceil([-3.01, -3.49, -3.5, -3.99])
ans =
-3
-3
-3
-3
Finally, the fix function performs truncation, eliminating the fractional part.
>> fix([3.01, 3.49, 3.5, 3.99])
ans =
3
3
3
3
>> fix([-3.01, -3.49, -3.5, -3.99])
ans =
-3
-3
-3
-3
2.11
MATLAB Programming Tips
The following bits of advice should help to get started, and if you get stuck.
If something does not work, check the dimensions of the data. It may work
with the transpose.
Search WWH ::




Custom Search