Solved


factorial of a number x
Factorial of a number x

4 months ago

Solved


Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

4 months ago

Solved


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

4 months ago

Solved


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

4 months ago

Solved


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

4 months ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

4 months ago

Solved


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

4 months ago

Solved


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

4 months ago

Solved


Cull vector elements that contain a specified digit
Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...

4 months ago

Solved


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

4 months ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

4 months ago

Solved


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

4 months ago

Solved


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

4 months ago

Solved


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

4 months ago

Solved


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

4 months ago

Solved


Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...

4 months ago

Solved


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

4 months ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

4 months ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

4 months ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

4 months ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

4 months ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

4 months ago

Solved


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

4 months ago

Solved


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

4 months ago

Solved


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

4 months ago

Solved


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

4 months ago

Solved


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

4 months ago

Solved


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

4 months ago

Solved


Convert a number to its Roman representation
Convert a given number to its Roman representation. For example, if the number is 98, it should display 'XCVIII'

4 months ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

4 months ago

Load more