Solved


The Five Infection (Boss Level)
Given a 3x3 matrix A, replace: every value that is equal to five every value that is directly adjacent to a five with zero in...

10 days ago

Solved


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

11 days ago

Solved


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

11 days ago

Solved


Simple Electrical Power Calculation
Calculate the electrical power using the formula: P=V×I where: V is the voltage (in volts) I is the current (in amperes)

11 days ago

Solved


Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I​ where: V is the voltage (in volts) I is the current (in ampere...

11 days ago

Solved


Fives Begone
Given any sentence as an input value 'sentence', turn all fives into the letter X and return the improved sentence. Also, turn a...

11 days ago

Solved


Broken Clock
Create a function that outputs t, an inputted matrix time x, in hours and minutes (hr:min) unless the time contains a five. In t...

11 days ago

Solved


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

11 days ago

Solved


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

12 days ago

Solved


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

12 days ago

Solved


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

12 days ago

Solved


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

12 days ago

Solved


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

12 days ago

Solved


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

12 days ago

Solved


calculate the length of matrix
input 1 array, calculate the length

4 months ago

Solved


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

4 months ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

4 months ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

4 months ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

4 months ago

Solved


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

4 months ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

4 months ago

Solved


Voltage in a lamp
A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

4 months ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

4 months ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

4 months ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

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

4 months 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 years ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

2 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

2 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...

2 years ago

Load more