Solved


remove nans fast
There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

3 years ago

Solved


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

3 years ago

Solved


Cryptomath: Addition
W A I T + A L L --------- G I F T S equals: 9 6 0 8 + 6 7 7 --------- 1 0 2 8 5 Given str...

3 years ago

Solved


Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...

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

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

3 years ago

Solved


Create different color vectors.
When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

3 years ago

Solved


Convert ColorSpec string to RGB triplet
Given a ColorSpec string, either in short or long form, return the corresponding RGB triplet. If the input is not a valid color,...

3 years ago

Solved


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

3 years ago

Solved


Change a specific color in an image
The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

3 years ago

Solved


Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

3 years ago

Solved


Find the jerk
No, it's not the author of this problem... Jerk is the rate of change in acceleration over time of an object. So, if given t...

3 years ago

Solved


Maior Primo
Dado um valor inteiro N, qual o maior valor primo <= N MaiorPrimo(5) = 5; MaiorPrimo(10) = 7;

3 years ago

Solved


Can you beat the lottery again (for hardcore coder) ?
Inspired by the Problem 1713 by Chris E. Here is the code that generates the first lottery number: rng('shuffle'); numb...

3 years ago

Solved


Which Prime
Given two prime numbers, specify the relation between them i.e. - 'Twin Prime', 'Cousin Prime', 'Sexy Prime' or 'None'

3 years ago

Solved


Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

3 years ago

Solved


Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

3 years ago

Solved


Red and green towers
Frankie has a large number of wooden cubes, painted in red and green. He is building little towers with his cubes, by stacking t...

3 years ago

Solved


Highest powers in factorials
This is the inverse of the problem <https://www.mathworks.com/matlabcentral/cody/problems/44747 Exponents in Factorials>. Inste...

3 years ago

Solved


Recycled Numbers (CodeJam Qualification Round 2012)
Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits from the ...

3 years ago

Solved


Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

3 years ago

Solved


Maximum sum from any 2 numbers with a variable number of inputs
Given a variable number of inputs, combine any 2 numbers from the inputs and output the maximum sum the combinations can generat...

3 years ago

Solved


Create all combinations of vectors
This function exists in the Neural Network Toolbox but is not available in Cody. Can you write such a function? See <http://...

3 years ago

Solved


Sum of combinations
Input: *X = 40*, *Y = [40 20 10 4]* Output: *Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 ...

3 years ago

Solved


TRON strategy toggle
Detect whether your lightcycle is on same side of existing walls as opponents lightcycle. This function is useful in toggling a...

3 years ago

Solved


NaN

3 years ago

Solved


GJam 2013 Veterans: Hedge
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard Hedgemony>. This is the Large data set ...

3 years ago

Solved


Deduce Equations for Simplified Interstellar Doppler Effect ✨
R2-D2 and C-3PO are friends. R2-D2 boards a spacecraft bound to a galaxy far, far away, but is always in contact with C-3PO, als...

3 years ago

Load more