MATLAB is a simple Mathematical coding language used in many sectors to implement many secured applications in Medical field and Engineering filed. This M-Coding uses a different type of functions under simple and complex equations.
MATLAB Built-in Functions:
We have categorized MATLAB functions into 3 types, which are frequently used in Coding on project based programming.
- Scalar Functions
- Vector Functions
- Matrix Functions
The type of scalar function built with basic trigonometric functions, which are illustrated below
1. SIN: trigonometric function; example: = sin(0:0.05:5)
2. COS – trigonometric cosine function; example: = cos(0:0.05:5)
3. TAN – trigonometric tangent function; example: = tan(0:0.05:5)
4. aSIN – trigonometric inverse sine (arcsine); example: = asin(0:0.05:5)
5. aCOS – trigonometric inverse cosine (arccosine); example: = acos(0:0.05:5)
6. aTAN – trigonometric inverse tangent (arctangent); example: = atan(0:0.05:5)
7. EXP – exponential; example: = exp(0:0.05:5)
8. LOG – natural logarithm; example: = log(-5)
9. ABS – absolute value; example: = abs(-5)
10. SQRT – square root; example: = sqtr(10)
11. REM – remainder; example: = rem(120, 67)
12. ROUND – round towards nearest integer; example: = round(9.87)
13. FLOOR- round towards negative infinity; example: =floor(7)
14. CEIL – round towards positive infinity; example: = ceil(43)
Vector functions have smallest to largest components and it used to sort the elements (Sum, medium and prod), check out many other used vector functions are given below;
1. MAX: maximum largest component
2. MIN: minimum smallest component
3. LENGTH: length of a vector
4. SORT: sorting in ascending order or descending order.
5. SUM: summing of elements
6. PROD: product of elements
7. MEDIUM: median values
8. MEAN: Used for Standard Deviation
Matrix Function is a basic mathamatical methods functions, if you aware of mathamatical methods in engineering then, you easily understood, What is Matrix functions; Just used follwoing keywords to display immediate results.
1. eye – identity matrix; example: eye(5)
2. zeros – matrix of zeros; example: zeros(4)
3. ones – matrix of ones; example: ones(3)
4. diag – extract diagonal of a matrix or create diagonal matrices; example: diag(5)
5. rand – randomly generated matrix; example: rand(5)
These above three MATLAB functions, which are used in basic MATLAB programs under signal tool box programs.