Gelöst


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

7 Monate vor

Gelöst


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

7 Monate vor

Gelöst


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

7 Monate vor

Gelöst


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

7 Monate vor

Gelöst


nth Rational Number
Return the nth rational number. This is the inverse to Problem 1471. Index of a Rational number The first ten positive rationa...

7 Monate vor

Gelöst


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

7 Monate vor

Gelöst


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

7 Monate vor

Gelöst


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

7 Monate vor

Gelöst


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

7 Monate vor

Gelöst


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

7 Monate vor

Gelöst


Simpson's Paradox - Calculate correlation coefficients for groups of data
Simpson's Paradox is a statistical phenomenon where groups of data can have a characteristic while the whole data set together h...

7 Monate vor

Gelöst


Dog Statistics
The vectors ht and wt contains the heights and weights of 20 golden retrievers. In some cases, it was not possible to make both ...

7 Monate vor

Gelöst


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

7 Monate vor

Gelöst


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

7 Monate vor

Gelöst


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

7 Monate vor

Gelöst


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

7 Monate vor

Gelöst


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

7 Monate vor

Gelöst


Find all vampire fangs
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

7 Monate vor

Gelöst


Fangs of a vampire number
A vampire number is a number v that is the product of two numbers x and y such that the following conditions are satisfied: at ...

7 Monate vor

Gelöst


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

7 Monate vor

Gelöst


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

7 Monate vor

Gelöst


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

7 Monate vor

Gelöst


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

7 Monate vor

Gelöst


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

7 Monate vor

Gelöst


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

mehr als ein Jahr vor

Gelöst


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

mehr als ein Jahr vor

Gelöst


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

mehr als ein Jahr vor

Gelöst


Calculating Student Grades
The matrix grades contains raw grades for 7 students who took your course. Each row represents a different student. The first 7 ...

mehr als ein Jahr vor

Gelöst


Determine if x is a combination of m and n
Given positive integers x, m, and n, determine if x can be written as x = am + bn for any (non-negative) integers a and b. Your ...

mehr als ein Jahr vor

Gelöst


Find the minimum of the column-maximums of a matrix
Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum...

mehr als ein Jahr vor

Mehr laden