Solved


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

14 years ago

Solved


Least common multiple of many numbers
1:6 -> 60

14 years ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

14 years ago

Solved


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

14 years ago

Solved


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

14 years ago

Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

14 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

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

14 years ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

14 years ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

14 years ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

14 years ago

Solved


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

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

14 years ago

Solved


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

14 years ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

14 years ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

14 years ago

Solved


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

14 years ago

Solved


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

14 years ago

Solved


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

14 years ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

14 years ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

14 years ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

14 years ago

Solved


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

14 years ago

Solved


Calculate euler's phi function
Compute the euler's phi function of a large integer. For more information about this topic please visit: <https://en.wikiped...

14 years ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

14 years ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

14 years ago

Solved


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

14 years ago

Solved


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

14 years ago

Solved


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

14 years ago

Solved


Vector Linear sum: (p1-m1)V1+(p2-m2)V2+...(pK-mk)Vk
Calculate the sum of a Vector times coefficients expressed as two strings. Example: Normal representation [ a b c ], [ p1 ...

14 years ago

Load more