Solved


Multivariate polynomials - convert monomial form to array
In <https://www.mathworks.com/matlabcentral/cody/problems/44259-product-of-two-multidimensional-polynomials Problem 44259> I ask...

mer än 6 år ago

Solved


Multivariate polynomials - sort monomials
In <https://www.mathworks.com/matlabcentral/cody/problems/44260-multidimensional-polynomials-convert-monomial-form-to-array Prob...

mer än 6 år ago

Solved


Pipeline - Variable-length Input
Design the |gt|(>) method of |function_handle| so that: >> 1 > @sin > @cos ans = 0.666366745392881 >> cos(sin(1...

mer än 6 år ago

Solved


Ternary Conditional Operator
Returns one of two expressions depending on a condition. (test) : (expression1) : (expression2) *test:* Any Boolean ex...

mer än 6 år ago

Solved


When Was That Goal Scored?
We want to find out when the goals were scored in a particular soccer game. For each game, we are given a "Goal Event Data" XML ...

mer än 6 år ago

Solved


Deleting Specific part.
if input is x= { /*[0..10]*/ 0, 11, 21, 31, 41, 55, 50, 10, 810, 9.10, /*[10...25]*/ 100, 110, 120, 130, 140, 255 ...

mer än 6 år ago

Solved


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

mer än 6 år ago

Solved


Automatic String Editing
In this function, you will take an incoming string, and output the same string with each character one letter later in the alpha...

mer än 6 år ago

Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

mer än 6 år ago

Solved


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

mer än 6 år ago

Solved


Matrix Generation from Vector Multiplication
Output the matrix generated from multiplying two vectors together

mer än 6 år ago

Solved


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

mer än 6 år ago

Solved


Check if inputted variable is a string or a number
Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).

mer än 6 år 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.

mer än 6 år ago

Solved


Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...

mer än 6 år ago

Solved


Write out numbers in words
Write out numbers in words ( range [0-9999] ) with British spelling rules. For example; * 1 > one * 56 > fifty-six * 100 >...

mer än 6 år ago

Solved


OXO counting
Count the number of occurrences of "OXO" in rows, columns, diagonals and anti-diagonals. Example: >> board = ['OOX' ...

mer än 6 år ago

Solved


Archimedes principle
According to Archimedes principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of an o...

mer än 6 år ago

Solved


How many problems and solutions did you like?
When I started to create problems in my early stages of playing Cody, one day, I realized that Aurelien Queffurust liked one of ...

mer än 6 år ago

Solved


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

mer än 6 år 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 ...

mer än 6 år ago

Solved


sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45

mer än 6 år ago

Solved


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

mer än 6 år ago

Solved


Compute average gain for some bets.
Given a vector containg the odds of some events in decimal format (e.g., |odds=[1.3 2.5 1.5]| ) and a vector of the same dimensi...

mer än 6 år ago

Solved


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

mer än 6 år ago

Solved


Minimum possible M of the maximum side of a triangle of given area A.
Suppose a triangle has area A. Suppose it has three sides S1, S2, and S3. Suppose M = max([S1 S2 S3]). What is the minimum po...

mer än 6 år ago

Solved


Calories in a slice of pizza?
The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...

mer än 6 år ago

Solved


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

mer än 6 år ago

Solved


Find the outlier in a set of samples
Given an array x of numbers. Assumed that this array has one outlier. Find the position p and the value v of the outlier in this...

mer än 6 år ago

Solved


Check if any duplicates in your data
Given an array x, return a number n equal to the largest number of repetitions in your data. For example: If x=[1 2 3 6 8 4 9]...

mer än 6 år ago

Load more