Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to find the logical indices o...
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
6 months ago
Solved
Roll the Dice!
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
[x1,x2] = rollDice(...
6 months ago
Solved
Maximum value in a matrix
Find the maximum value in the given matrix.
For example, if
A = [1 2 3; 4 7 8; 0 9 1];
then the answer is 9.