Solved


Minimum Distance between two N-sided Polygons
This Challenge is to determine the minimum distance between two non-overlapping polygons. The input is a cell array of two vecto...

10 months ago

Solved


Minimum Distance Point to Segment
This Challenge is to determine the minimum distance from a 2-D line segment defined by two points to a point. The point is (p...

10 months ago

Solved


Number of lattice points within a circle
Find the number of points (x,y) in square lattice with x^2 + y^2 =< n. This is related to Jame's <http://www.mathworks.com/matla...

10 months ago

Solved


Given the name from the legend, return the handle
Write a function that will return the handle to the desired object. The input for this function will be a string which represent...

10 months ago

Solved


A (wrong) place for everything, and everything in its (wrong) place
You have an equal number of cups and balls, each labelled from one to N. You randomly place one ball in each cup. Determine th...

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

10 months ago

Solved


Altitude of locations on the earth
Find the altitude of a location on the earth, given latitude and longitude coordinates, above mean sea level. Input__________...

10 months ago

Solved


RPN Calculator for simple arithmetic expressions
Reverse-Polish-Notation (RPN) is a machine friendly form of calculating expressions. Example, to evaluate, (1+2)*4 + 5 - 3 you e...

10 months ago

Solved


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

10 months ago

Solved


Creation of 2D Sinc Surface
This Challenge is to efficiently create the Sombrero function of various sizes, resolutions, and frequencies. <<https://sites...

10 months ago

Solved


Evaluating continued fractions
Given row vector c=[c0 c1 c2 c3 ...] evaluate the continued fraction x=c0+1/(c1+1/(c2+1/(c3+...))) If c is a ...

10 months ago

Solved


Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...

10 months ago

Solved


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

10 months ago

Solved


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

10 months ago

Solved


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

10 months ago

Solved


'X'avier
Given a square matrix A of size n, write a function to create a new matrix B where only the elements on the main diagonal and th...

10 months ago

Solved


Symmetric Pair
Given an (n, 2) matrix, remove any symmetric pairs from the matrix. Keep the first occurrence. (2, 3) and (3, 2) are considere...

10 months ago

Solved


Unique rows
A matrix is given as the input. Remove any duplicate rows from the matrix. keep the first occurrence.

10 months ago

Solved


Pairs with Given Sum
Given an array of integers and a target sum, return all unique pairs whose sum is equal to the target. The output should be a ma...

10 months ago

Solved


Greater than before
Given an array of integers, write a function that returns elements that are greater than the one before them. For instance, ...

10 months ago

Solved


Calculate the probability that at least two people in a group share the same birthday.
Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

10 months ago

Solved


Coin change combinations.
Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

10 months ago

Solved


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

10 months ago

Solved


FizzBuzz
<http://c2.com/cgi/wiki?FizzBuzzTest FizzBuzz Test> The "Fizz-Buzz test" is an interview question designed to help filter out...

10 months ago

Solved


Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

10 months ago

Solved


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? Input: N % n...

10 months ago

Solved


Get ranks of values in a vector
For a given vector, say [6 3 8 2], return the ranks (ascending) of observations, i.e. [3 2 4 1]. Do not worry about tied ranks. ...

10 months ago

Solved


Create a recurrence matrix for a vector of data
In <https://en.wikipedia.org/wiki/Conversation_analysis conversation analysis>, it's often useful to track the contributions fro...

10 months ago

Solved


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

10 months ago

Solved


Create array of all Distances between two Sets of Points : No Neural Network Toolbox
This Challenge is a subsection of <http://www.mathworks.com/matlabcentral/cody/problems/1110-usc-fall-2012-acm-martian-pranks Ma...

10 months ago

Load more