Audio Engineer @ Harman

Solved

pay it forward

Choose a number (integer between 0 and 65535) You will pass this problem if you are the *second* person to choose that same n...

12일 ago

Solved

Too Many Zeros, Dump Them!

Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

12일 ago

Solved

Covering area

As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

12일 ago

Solved

Angle between Two Vectors

The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

12일 ago

Solved

Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed

Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

12일 ago

Solved

does it touch ?

given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

14일 ago

Solved

commutative?

Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

14일 ago

Solved

Set defaults

Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

14일 ago

Solved

Find matching parenthesis

One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

14일 ago

Solved

collision

several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

14일 ago

Solved

Given two strings, find the maximum overlap

Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

14일 ago

Solved

Leaking?

Graham's law states that the rate of effusion of a gas is inversely proportional to the square root of its molecular weight. A b...

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

15일 ago

Solved

Find the "ordinary" or Euclidean distance between A and Z

A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

15일 ago

Solved

DC chopper

Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

15일 ago

Solved

Construct a string from letters and counts

Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

16일 ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.

If x = 5, y = 5 * (5+5) * 5 = 250

16일 ago

Solved

Decimation - Optimized for speed

This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

17일 ago

Solved

Decimation

When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

17일 ago

Solved

Oh Zero Zero Zero!!!

Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...

17일 ago

Solved

Count consecutive 0's in between values of 1

So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

17일 ago

Solved

Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)

For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

17일 ago

Solved

Implement a bubble sort technique and output the number of swaps required

A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

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

17일 ago

Solved

Set a diagonal

Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

18일 ago

Solved

DNA N-Gram Distribution

Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

3달 ago

Solved

Find the palindrome

Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

3달 ago

Solved

Tic Tac Toe FTW

Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

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

3달 ago