openskills.info
MATLAB Fundamentals logoCourse Preview

MATLAB Fundamentals

MATLAB is a programming language and computing environment built around matrices and arrays, used by engineers and scientists to analyze data, develop algorithms, and visualize results. You write commands that operate on whole arrays of numbers, not just one value at a time.

itProgramming languages

Don't Panic: MATLAB Fundamentals

MATLAB is a programming and numeric computing environment built around arrays, which is a reassuringly compact idea until the arrays begin having opinions about their shape. It exists so engineers and scientists can move from a calculation to a plotted result without first constructing a small private nation of Fortran programs. The command line, editor, workspace, and plot tools are all there to keep that work in one place.

The important word is array: every value has a shape. A scalar is a one-by-one array. A vector is one row or one column. A matrix has both. MATLAB is unusually happy to perform a calculation across a whole array, which is productive right up to the moment a row vector meets a column vector and produces a result that is mathematically valid but not the result on your shopping list.

That is why the period deserves its own tiny warning label. A * B follows matrix multiplication rules. A .* B multiplies matching elements. The symbols have the same family resemblance and entirely different jobs, like two buttons in a lift marked "open" and "deploy". Before running an expression, picture the result's shape. Then use size to see whether reality has accepted the proposal.

Start at the command line when a calculation is still a question. Once it works, put the sequence in a script so it can be run again. When the calculation needs a proper boundary, make it a function with declared inputs and outputs. A script shares the workspace; a function tells everyone which values cross the door. This distinction becomes valuable at exactly the moment the workspace begins to resemble a drawer full of cables.

Plots are not decoration. plot(x,y) connects matched values, and labels let somebody outside the current session understand what the axes mean. Use a plot to inspect a result before trusting it. A result can run while its shapes, types, or units are still wrong, which is MATLAB's polite way of saying that it did precisely what it was told.

Next, open the Intro for the map of MATLAB, Simulink, and toolboxes. The Slides make the array and operator decisions visible at a glance. The Cheatsheet is for syntax while working. Then use the practice reference and exercise to turn one sampled signal into a function and a labeled plot. After that, choose a toolbox because the problem needs it, not because the toolbox shelf looks inviting.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://www.mathworks.com/products/matlab.html
  • https://www.mathworks.com/help/matlab/getting-started-with-matlab.html
  • https://www.mathworks.com/help/matlab/matrices-and-arrays.html
  • https://www.mathworks.com/help/matlab/learn_matlab/array-indexing.html
  • https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html
  • https://www.mathworks.com/help/matlab/data-types.html
  • https://www.mathworks.com/help/matlab/scripts.html
  • https://www.mathworks.com/help/matlab/matlab_prog/create-scripts.html
  • https://www.mathworks.com/help/matlab/function-basics.html
  • https://www.mathworks.com/help/matlab/ref/plot.html
  • https://www.mathworks.com/products.html
  • https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted
  • https://github.com/mathworks/awesome-matlab-students
  • https://github.com/uhub/awesome-matlab
  • https://yalmip.github.io/
  • https://cvxr.com/cvx/
  • https://petercorke.com/toolboxes/robotics-toolbox/
  • https://github.com/altmany/export_fig
  • https://github.com/matlab2tikz/matlab2tikz
  • https://www.mathworks.com/company/newsletters/articles/a-brief-history-of-matlab.html
  • https://blogs.mathworks.com/cleve/2012/08/27/matlab-debut-and-the-potted-palm/
  • https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/
  • https://www.mathworks.com/help/matlab/matlab_prog/preallocating-arrays.html
  • https://blogs.mathworks.com/loren/2012/11/29/understanding-array-preallocation/
  • https://www.mathworks.com/help/parallel-computing/quick-start-parallel-computing-in-matlab.html
  • https://octave.org/
  • https://wolfram.com/mathematica/
  • https://www.maplesoft.com/products/maple/
  • https://www.scilab.org/about/scilab-open-source-software