Solved


Number of paths on a n-dimensional grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

2 months ago

Solved


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

2 months ago

Solved


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

2 months ago

Solved


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

3 months ago

Solved


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

3 months ago

Solved


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

3 months ago

Solved


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

3 months ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

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

3 months ago

Solved


Fill a zeros matrix (★★★★★)
(Copy of Problem 830) The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...

3 months ago

Solved


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

3 months ago

Solved


Reindex a vector (★★)
(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

3 months ago

Solved


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

3 months ago

Solved


Average of corner elements of a matrix (★★)
(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

3 months ago

Solved


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

3 months ago

Solved


Power Numbers
Find the n-th power of m.

3 months ago

Solved


Times 10
Try out this test problem first. Given the variable x as your input, multiply it by ten and put the result in y. Examples:...

3 months ago

Solved


Kelvin to Fahrenheit
You can find a doc about it in here => https://www.rapidtables.com/convert/temperature/how-kelvin-to-fahrenheit.html x is kelvi...

3 months ago

Solved


Given A4 sizes find A3's long side
I think you know the relation between A3 and A4 paper so givens are sides of A4 x1=long side of A4 y1=short side of A4 y2 is ...

3 months ago

Solved


Volume of Equilateral Triangle Prism
Find volume of equilateral triangle prism x = side of triangle l = length of prism

3 months ago

Solved


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x ...

3 months ago

Solved


Test Driven Solution - Probability Problem 1
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

3 months ago

Solved


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

3 months ago

Solved


Probabilities - More brains than luck
This problem is related to <http://it.mathworks.com/matlabcentral/cody/problems/596-more-luck-than-brains Problem 596. More luck...

3 months ago

Solved


Summation of integers

3 months ago

Solved


Code breaker, Part III: Operation Xiangliu
You have been tasked with decoding several batches of coded messages that have been intercepted. Based on previous intellig...

3 months ago

Solved


Find Logic 5

3 months ago

Solved


Find Logic 12

3 months ago

Solved


Find Logic 10

3 months ago

Solved


find the value

3 months ago

Load more