MATLAB Study Guide 2026
Everything you need to pass the MATLAB exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.
📋 MATLAB Exam Format at a Glance
📚 MATLAB Topics to Study (22)
✍️ Sample MATLAB Questions & Answers
1. Which function in MATLAB computes numerical integration using adaptive quadrature?
The integral function uses adaptive Gauss-Kronrod quadrature to numerically integrate a function over a specified interval.
2. What does `regexp(str, pattern)` return in MATLAB?
regexp returns a vector of starting indices where the regular expression pattern matches within the input string.
3. Which MATLAB function computes the linear convolution of two discrete-time sequences u and v?
`conv(u, v)` returns the convolution of vectors u and v, producing an output of length length(u)+length(v)-1.
4. In a fprintf statement, what character is used to print a new line?
In MATLAB's `fprintf` function, the `\n` character is a special escape sequence used to insert a newline. When `fprintf` encounters `\n`, it moves the cursor to the beginning of the next line. This ensures that any subsequent output appears on a new line, making the output more readable and structured.
5. Which MATLAB function minimizes a function subject to linear constraints?
linprog solves linear programming problems to minimize a linear objective function subject to linear equality and inequality constraints.
6. After executing the following code, what is the final value of `x`? ```matlab x = 1; n = 10; while x <= n x = x * 2; n = n - 1; end ```
The loop executes as follows: - Pass 1: `x=1`, `n=10`. Condition `1<=10` is true. `x` becomes `2`, `n` becomes `9`. - Pass 2: `x=2`, `n=9`. Condition `2<=9` is true. `x` becomes `4`, `n` becomes `8`. - Pass 3: `x=4`, `n=8`. Condition `4<=8` is true. `x` becomes `8`, `n` becomes `7`. - Pass 4: `x=8`, `n=7`. Condition `8<=7` is false. The loop terminates. The final value of `x` is 8.