Gelöst


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

mehr als 11 Jahre vor

Gelöst


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];

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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 =...

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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 (...

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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.

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Mehr laden