Solved


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

11 years ago

Solved


Measure a Special Distance
Given an n-by-2 matrix with positive and negative numbers, return an n-by-n matrix in the manner of the function template.

11 years ago

Solved


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

11 years ago

Solved


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

11 years ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

11 years ago

Solved


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

11 years ago

Solved


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

11 years ago

Solved


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

11 years ago

Solved


How many palindromes?
* Given a set of letters, count all possible palindromes, using all of those letters. * For example, if the set is {'A' 'A' 'A'...

11 years ago

Solved


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

11 years ago

Solved


Friday the 13th
According to superstition, lots of unpleasant stuff happens on Friday the 13th, so you might like to find the next occurence of ...

11 years ago

Solved


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

11 years ago

Solved


N-Dimensional Sorting
Given two N-dimensional matrices A and B, first sort A in increasing order and then sort B with respect to the index of A. Y...

11 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

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

11 years ago

Solved


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

11 years ago

Solved


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

11 years ago

Solved


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

11 years ago

Solved


Pandigital number n°2 (Inspired by Project Euler 32)
After <http://www.mathworks.com/matlabcentral/cody/problems/2319 Problem 2319>. An n-digit number is pandigital if it makes u...

11 years ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

11 years ago

Solved


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

11 years ago

Solved


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

11 years ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

11 years ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

11 years ago

Solved


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

11 years ago

Solved


Array ex-OR
There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

11 years ago

Solved


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

11 years ago

Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

11 years ago

Solved


Concatenate a successive power matrix in a column matrix
Generate F = [M1 M^2 ... M^p] with M a matrix, without using for.

11 years ago

Solved


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

12 years ago

Load more