Solved


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

11 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1];

11 years ago

Solved


Find the maximal cliques in an undirected graph
This is a variant of a <http://www.mathworks.com/matlabcentral/cody/problems/2646-determine-the-number-of-maximal-cliques-in-an-...

11 years ago

Solved


Determine the number of maximal cliques in an undirected graph
In an undirected graph, a clique is a subset of vertices that are fully connected, i.e. there is an edge between all pairs of ve...

11 years ago

Solved


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

11 years ago

Solved


Kurchan 4x4 - Optimal score
Related to Problem 1646, but bigger. Technically, all you need to do for this Cody problem is input a 4x4 matrix containing the...

11 years ago

Solved


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

11 years ago

Solved


Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

11 years ago

Solved


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

11 years ago

Solved


The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

11 years ago

Solved


How Many Months Until It's Today Again?
Given a particular date, calculate how many months must pass before that same day of the month occurs on the same day of the wee...

11 years ago

Solved


Ulam spiral 2: The revenge
Starting from the problem <https://www.mathworks.com/matlabcentral/cody/problems/2644-the-ulam-matrix>, transform the Ulam Matri...

11 years ago

Solved


Find the same and successive values in a vector
Find the same and successive values in a vector. For example: Input x = [ 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 ] Start and end...

11 years ago

Solved


Higher! Lower!
My kids have started to play the "I'm thinking of a number between X and Y" game in the car on trips to and from their swim less...

11 years ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

11 years ago

Solved


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

11 years ago

Solved


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

11 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

11 years ago

Solved


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

11 years ago

Solved


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

11 years ago

Solved


Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...

11 years ago

Solved


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

11 years ago

Solved


Did you say please? - Find one string within another without strfind or regexp/regexpi
For a given string sentence, determine if the string word 'please' is present or not. If so, return the string 'OK', else return...

11 years ago

Solved


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

11 years ago

Solved


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

11 years ago

Solved


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

11 years ago

Solved


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

11 years ago

Solved


Alternative Scoring. Create an incremental spiral.
This problem is created to test an alternative Cody scoring system. It is based on the current one, but few changes are introduc...

11 years ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

11 years ago

Solved


LocateMembership | Membership of Matrix in another matrix
Let a and b be given by a = [ 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 4 0 0 0 ] b = [ 2 1 ...

11 years ago

Load more