If you have ever had the experience of working with a calculator, then you are already familiar with some of the most important parts of programming a computer.
When programming with audio, the mathematical operations of addition, subtraction, multiplication, and division are very important.
In the Matlab programming language, these operations can be executed by using the same symbols you would use with a calculator.
- Addition, +
- Subtraction, –
- Multiplication, *
- Division, /
In computer programming terminology, these symbols are described as math operators.
An additional operator is the ^ symbol. This operator is used to take a number to a power.
One example would be: 2 ^ 3 = 2 * 2 * 2.
These operators can be used to accomplish plenty of things with audio. Additionally, there are many math functions that can be used to perform other things.
Just as with most calculators, Matlab uses the PEMDAS order of operations (parentheses, exponent, multiplication/division, addition/subtraction).