Solved


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

4 years ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

4 years ago

Solved


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

4 years ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

4 years ago

Solved


Tribute to Ramanujan
The nth taxicab number, denoted as T(n), is defined as the smallest number that can be expressed as a sum of two positive algebr...

4 years ago

Solved


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

4 years ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

4 years ago

Solved


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

4 years ago

Solved


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

4 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

4 years ago

Solved


Phoneword Translator
Given an alphanumeric telephone number (Ex. 1-800-COLLECT), return the purely numeric phone number as a vector. This problem use...

4 years ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should be a...

4 years ago

Solved


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

4 years ago

Solved


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

4 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

4 years ago

Solved


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

4 years ago

Solved


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

4 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

4 years ago

Solved


String math
You will be given a string that describes a simple math equation. Your job is to determine if the value of the equation is equal...

4 years ago

Solved


What digit is it?
The function you are being asked to write will take three numbers (n,x,q) as input. The object of the function is to determine ...

4 years ago

Solved


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

4 years ago

Solved


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

4 years ago

Solved


Compute the Sequence of the Day
A sequence starts with 1 and 2, and each subsequent term is the sum of the digits of the product of the previous two terms. As a...

4 years ago

Solved


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

4 years ago

Solved


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

4 years ago

Solved


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

4 years ago

Solved


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

4 years ago

Solved


Easy Sequences 34: Modified Pascal's Triangle
Consider the integer triangle below: It follows the same ...

4 years ago

Solved


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

4 years ago

Solved


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

4 years ago

Load more