Solved


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

19 days ago

Solved


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

20 days ago

Solved


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

20 days ago

Solved


How many Christmas presents under the tree?
For many families at Christmas, each family member gives 1 present to every other family member. The main exception is that chil...

20 days ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

20 days ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

20 days ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

20 days ago

Solved


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...

20 days ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

20 days ago

Solved


Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,2,3]; Returns 1.

20 days ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...

20 days ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

20 days ago

Solved


Remove a specific column with min value
Remove the column that contain the min value in the matrix? If you like the problem, please give it a like:)

20 days ago

Solved


Remove a specific column with max value
Remove the column that contain the max value in the matrix? If you like the problem, please give it a like:)

20 days ago

Solved


Remove a specific row with min value
Remove the row that contain the min value in the matrix? If you like the problem, please give it a like:)

20 days ago

Solved


Remove a specific row with max value
Remove the row that contain the max value in the matrix? If you like the problem, please like it :)

20 days ago

Solved


row removal
Consider a matrix and remove the first row of the matrix.

20 days ago

Solved


Total energy

20 days ago

Solved


Potential energy calculation

20 days ago

Solved


Kinetic energy calculation

20 days ago

Solved


Laws of motion 1

20 days ago

Solved


Laws of motion 2

20 days ago

Solved


Laws of motion 3

21 days ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

21 days ago

Solved


Laws of motion 5
Calculate the force is u are given mass and acceleration.

21 days ago

Solved


Laws of motion 6

21 days ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

21 days ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

21 days ago

Solved


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

21 days ago

Solved


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

21 days ago

Load more