# MATLAB Programming/Bonus Chapters/MATLAB Benefits and Caveats

[MATLAB Programming\|/MATLAB Programming]m]
Chapter 1: MATLAB ._.
    Fundamentals of MATLAB
    MATLAB Workspace
    MATLAB Variables
    *.mat files
Chapter 2: MATLAB Concepts
    MATLAB operator
    Data File I/O
Chapter 3: Variable Manipulation
    Numbers and Booleans
    Strings
    Portable Functions
    Complex Numbers
Chapter 4: Vector and matrices
    Vector and Matrices
    Special Matrices
    Operation on Vectors
    Operation on Matrices
    Sparse Matrices
Chapter 5: Array
    Arrays
    Introduction to array operations
    Vectors and Basic Vector Operations
    Mathematics with Vectors and Matrices
    Struct Arrays
    Cell Arrays
Chapter 6: Graphical Plotting
    Basic Graphics Commands
    Plot
    Polar Plot
    Semilogx or Semilogy
    Loglog
    Bode Plot
    Nichols Plot
    Nyquist Plot
Chapter 7: M File Programming
    Scripts
    Comments
    The Input Function
    Control Flow
    Loops and Branches
    Error Messages
    Debugging M Files
Chapter 8: Advanced Topics
    Numerical Manipulation
    Advanced File I/O
    Object Oriented Programming
    Applications and Examples
    Toolboxes and Extensions
Chapter 9: Bonus chapters
    MATLAB Benefits and Caveats
    Alternatives to MATLAB
    [MATLAB_Programming/GNU_Octave|What is Octave= (8) hsrmonic functions]
    Octave/MATLAB differences

## MATLAB Benefits
### Ease of Use

MATLAB is an interpreted and interactive language. Programs can be easily written and modified by a user with MATLAB, which is a built-in integrated development environment and debugger. Also, there are no need to use import functions as MATLAB will use the necessary functions as it includes many built-in math and engineering functions (only if necessary toolboxes are installed)

### Platform Independent

MATLAB language is supported by Windows, Linux and Mac. Thus, a program written on one platform can be easily run on other platforms. This is a platform independence feature.

### Wide range of capabilities

Current MATLAB version has a wide range of capabilities, which includes data analysis, statistical analysis, optimization, signal processing, communications, control design, test and measurement, image processing, and computational finance

### Full Graphics Capabilities

MATLAB provides advanced graphics that can help visualize the scientific and engineering data very well. The graphs are highly customizable such: One can change the colors, lines and marker, add annotations, LATEX expressions, legends, the addition of multiple axes etc.

### Good Source of Help

MATLAB is widely used in industry and academia, so there is a wealth of support and resources available. There are many large communities that let you learn MATLAB such as Reddit (46.5k users) , Facebook group (MATLAB Programs/Code (matlabcoding.com). Hence, you might find answers that the people that come before you that might encounter similar problems too.

## MATLAB Caveats
### Expensive

MATLAB is very expensive for the base programs, plus additional official toolboxes from Mathwork are also expensive and costs can ramp up into thousands (Especially for students with limited budgets)

### Closed Source

MATLAB is closed source. Hence, students that are interested on how the algorithm works may stuck due to closed source of the MATLAB functions.

### Slow & Inefficient

It is slow compared to compiled programming languages. MATLAB is not efficient for nested loops and will not automatically take advantage of parallelism that are introduced in the code and may need to buy Parallel Toolbox .

### Awkward Implementations

* If you have already coded in fully object-oriented programming (OOP) language, in particular, Python, you will find some oddities in MATLAB’s OOP implementation as MATLAB is more to scripting and not coding as you might with other programming languages. You may feel this when, for example, you are working with cell arrays in MATLAB.
* There are no in-place operators like +=. This will leads to lines that are much longer and more harder to read.

### Poor Documentations

The documentation doesn't always have enough examples therefore you may need look on-line for different examples of using a certain function. For example, the function fibodemo.

### Confusing error message

Run-time errors can be difficult to debug

## References

https://web.archive.org/web/20210921113616/https://modelingguru.nasa.gov/docs/DOC-1762