Solved


Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

4 years ago

Solved


Find left eigenvector of row stochastic matrix
Find the left eigenvector of the given stochastic matrix P that has eigenvalue 1. Normalize the vector so the sum of the entri...

4 years ago

Solved


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

4 years ago

Solved


Pick the die most likely to win
After discussing Rock, Paper, Scissors, Lizard, Spock in The Simpsons and their Mathematical Secrets, Simon Singh writes that in...

4 years ago

Solved


longest common semi-substring
Finding longest common substring is a common problem in string processing. This problem is a variant of that. Two strings are...

4 years ago

Solved


Given a number between 1-365 (a day number in a non leap year) , find what day of what month it is.
For a given number between 1-365 (a day number in a non leap year), you should check which day of which month it is. for exam...

4 years ago

Solved


Only once: cleaning up your columns
We have a logical array (with ones and zeroes). It is simple: after processing every column may only contain a single true value...

4 years ago

Solved


Besson Ranks
Return Besson Ranks. You can look at <https://www.sciencedirect.com/science/article/pii/0895717789903671 this article.> Besso...

4 years ago

Solved


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

4 years ago

Solved


Singular Value Decomposition
Calculate the three matrices of the singular value decomposition (A = U*S*V^T) for each provided matrix. U and V are square unit...

4 years ago

Solved


Pumpkin Pie!
It's time for desert at Thanksgiving. You've all gathered at grandma's house, and she's about to start cutting the pumpkin pie. ...

4 years ago

Solved


Cody Computer Part 5 - Guess the Name of Cody Computer
Network computers have generally a nickname to be identified. Can you guess the nickname of the Cody Computer? No inpu...

4 years ago

Solved


Unique: Speed Enhancement for uint(8,16,32)
This Speed Performance Challenge is to optimize Unique for processing uint8/uint16/uint32 variables. *Input:* A (column vecto...

4 years ago

Solved


Find: Faster Alternatives for Large Sorted/Unique Vectors
The Challenge is to create faster Find methods for large unique ascending vectors. Methods exist that are 1000 times faster t...

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

4 years ago

Solved


Find the distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

4 years ago

Solved


Lunar Arithmetic (Multiplication)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

4 years ago

Solved


Muphry's Law of MATLAB
You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...

4 years ago

Solved


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

4 years ago

Solved


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

4 years ago

Solved


AK Sorting according to given order
Conventional ascending order of one digit number is [ 0, 1, 2, ......9]. Now this order is changed and stored in vector a. For e...

4 years ago

Solved


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

4 years ago

Solved


Pentago: find winning move
<http://en.wikipedia.org/wiki/Pentago Pentago> is a challenging two-player strategy game. The objective is to be the first playe...

4 years ago

Solved


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

4 years ago

Solved


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

4 years ago

Solved


Look and say Conway's sequence
In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, ...

4 years ago

Solved


Game of life - 01
Refer to <https://en.wikipedia.org/wiki/Conway's_Game_of_Life> given a set of cells (the initial state) represented by 1(l...

4 years ago

Solved


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

4 years ago

Solved


distance to a straight line (2D) given any 2 distinct points on this straight line
Given 2 points P1,P2 on a straight line and a 3rd point, determine the distance of the 3rd point to the straight line. Your answ...

4 years ago

Load more