Discussion


Using the Extended Euclidean Algorithm & Bézout’s Theorem
Many MATLAB Cody problems involve solving congruences, modular inverses, Diophantine equations, or simplifying ratios under cons...

11 months ago | 0

Solved


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

11 months ago

Solved


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? Input: N % n...

11 months ago

Solved


Tell your secret
A secret can be told only to 2 persons in 5 minutes. Now, these 2 more persons can spread the secret to 4 other people in the ne...

11 months ago

Solved


Vigenere cipher - be like Sherlock Holmes!
You're a young detective. Every detective needs a function to decrypt a vigenère cipher. It's a modification of a caesar cipher....

11 months ago

Solved


Exponents in Factorials(hard)
This is problem is a harder version of "Problem 44747. Exponents in Factorials". <https://ww2.mathworks.cn/matlabcentral/cody/p...

11 months ago

Solved


Collect a set of candy wrappers
This past Halloween, the siblings Matilda and Labrun amused (and sometimes confused) their many neighbors with their costumes in...

11 months ago

Solved


Can you beat the lottery?
Well this one you may not get every time, but it is a lottery! Here is the code that generates the lottery numbers (you can try ...

11 months ago

Solved


Who am I ?
Who am I ? Write any function that reveals itself under these constraints. Hint: I am combinatorial code, and I don't like stat...

11 months ago

Solved


Sum the Infinite Series II
For any x in the range 0 < x and x < 2*pi radians, find the sum of the following infinite series: c = 1 + 1/2*cos(x) + 1/2*3/4...

11 months ago

Solved


Persistence will not help you solve this problem.
Create a function without inputs that adds one to the output every time it is called. A different possibility of solving this ha...

11 months ago

Solved


Get Cody's screen size
Return an object that helps this problem's test suite return Cody's screen size.

11 months ago

Solved


Sieve of Eratosthenes
Find the nth lucky prime number. <https://planetmath.org/luckyprime> can u find a way for large n?

11 months ago

Solved


Filter British English into American English
Given a sentence written with British spelling, return the sentence with the offending word(s) replaced with the American spelli...

11 months ago

Solved


Orthogonal lines
Check whether two given lines are orthogonal or not. Two lines are orthogonal if they create a right angle at their intersect...

11 months ago

Solved


Height of a four-pointed star polygon
Given the area A, of a rectangle with dimensions l1xl2, where the side lengths are integers and form the smallest possible perim...

11 months ago

Solved


Covering rectangle area of a four-pointed star polygon
Given the four-pointed star polygon formed by the rectangle, with dimensions l1xl2, and four triangles, with height, h, from the...

11 months ago

Solved


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

11 months ago

Solved


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

11 months ago

Solved


Calculate SNR in dB using original signal and quantized signal
origs: the original signal quants: the quantized signal *hint* : need to calculate the quantization error and plug into SN...

11 months ago

Solved


Count the Even Digits in a Number
Given a positive integer n, write a function that returns how many digits of n are even. Even digits are: 0, 2, 4, 6, 8

11 months ago

Solved


Find the path through the cell
A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

11 months ago

Solved


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

11 months ago

Solved


That's not my hat!
There exists a highly secretive hat consortium. Members possess identical hats. The members are invited to a meeting. All of the...

11 months ago

Solved


bad colorimeter?
You have tested one good and one bad colorimeters with a colored solution at two path lengths of light and recorded transmittanc...

11 months ago

Solved


Create array of all Distances between two Sets of Points : No Neural Network Toolbox
This Challenge is a subsection of <http://www.mathworks.com/matlabcentral/cody/problems/1110-usc-fall-2012-acm-martian-pranks Ma...

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

11 months ago

Solved


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

11 months ago

Solved


Find the right x in a 1. order Polynomal (y = m*x+c)
Given two points in a Cartesian coordinate system, find the x-value, where polynomial of 1. order (y = m*x+c) is equal to a giv...

11 months ago

Solved


Find 1's Complement
Find 1's complement of a binary number For Example: x = 10011010 1's complement of x = 01100101

11 months ago

Load more