Solved


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

2 months ago

Solved


What kind of triangle?
Write a function named check_triangle that receives three positive integers as input: a, b, and c. These three numbers are inte...

2 months ago

Solved


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

2 months ago

Solved


Check p² = 24k + 1, p > 3, the 'golden prime squares' equation
Historical context In december 2023, I / Nicolas Douillet was working on prime squares properties and I found* the formula : ...

2 months ago

Solved


Define the operators of function_handles
Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

2 months ago

Solved


Frequencies of prime gaps
Problem statement Given two positive integers n and , write a function which computes the frequency of the gap between two ...

2 months ago

Solved


String permutations on phone keyboard
Given a number such as 2639 return all possible string permutations using the phone-keyboard on Problem 1069. input = 78 outpu...

2 months ago

Solved


Decrypt a secret message!
The crypto system in question is based on phone keyboard. We need two numbers in order to decrypt a word. First number represent...

2 months ago

Solved


Extra colors
Context In the RGB color system used by Matlab, the color is a 1 x 3 / row vector [R G B] with each value/component R, G, B in ...

2 months ago

Solved


Create co-occurrence matrix

2 months ago

Solved


Create formatted value string Cell array of a vector
This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

2 months ago

Solved


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

2 months ago

Solved


Add non-triangular numbers
The nth triangular number is the sum of the first n positive integers. The sequence of triangular numbers starts 1, 3, 6, 10, 15...

2 months ago

Solved


Compute Khinchin's constant
Khinchin's constant K_0 = 2.684542001... (also written "Khintchine's constant") has the amazing property that it is the limiting...

2 months ago

Solved


TingTing
Output logical "true" if the input is the answer to luck and money$$$. Otherwise, output logical "false".

2 months ago

Solved


Functionality 1
It's all about functionality. *Cheating is allowed but not required*

2 months ago

Solved


Write a code to implement the improved Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . It's possible to improve on Euler's method by ...

2 months ago

Solved


Orthogonalize 3 column vectors using the Gram-Schmidt process
Use the Gram-Schmidt process to orthogonalize three linearly independent column vectors. Return three output column vectors that...

2 months ago

Solved


A "Complex" Converter: Rectangular Form <-> Polar Form
*BACKGROUND / MOTIVATION:* Complex numbers can be an important tool in an electrical engineer's toolbox because they can help...

2 months ago

Solved


Orthogonalize a 2x2 matrix using the Gram-Schmidt process
Use the Gram-Schmidt process to orthogonalize two linearly independent column vectors. Return two output column vectors that are...

2 months ago

Solved


Multiplying the Sums of Two Arrays
Get two arrays, add the values within the array up, and then multiply the two total values. [2,3]*[3,6] 5*18 90

2 months ago

Solved


Write a code to implement Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . The challenge is to write a code that can take...

2 months ago

Solved


Neural Net: Back Propagation of Quad Output with Bias, ReLU
This challenge is to return the WH_delta and WP_delta, given X, WH, WP, EPY using ReLU on the hidden layer and Softmax on the ou...

2 months ago

Solved


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

2 months ago

Solved


Latest Question On Cody
Get the problem number of the latest submitted Problem on Cody. Copying the test suite code might not help.

2 months ago

Solved


Is it Possible? ( Easy )
In the first part of series, we simplify the problem. Given two jugs with capacities A and B, and a target amount T, determine i...

2 months ago

Solved


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

2 months ago

Solved


The Secret Code of Mars
NASA has intercepted a mysterious signal from Mars filled with random letters and numbers. Scientists believe each number in the...

2 months ago

Load more