Gelöst


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

etwa ein Jahr vor

Gelöst


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

etwa ein Jahr vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

etwa ein Jahr vor

Gelöst


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

etwa ein Jahr vor

Gelöst


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

etwa ein Jahr vor

Gelöst


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

etwa ein Jahr vor

Gelöst


Minimum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/min.html min> function can operate along either the rows or the columns...

etwa ein Jahr vor

Gelöst


Compute the period of a pendulum started from a finite initial angle
Cody Problem 49830 asks for the period of a pendulum swinging through a small angle. Here the pendulum started at rest from an ...

etwa ein Jahr vor

Gelöst


Compute the fractional derivative
Cody Problem 1370 asks us to compute the derivative of a polynomial. This problem extends that idea to fractional derivatives, w...

etwa ein Jahr vor

Gelöst


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

etwa ein Jahr vor

Gelöst


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

etwa ein Jahr vor

Gelöst


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

etwa ein Jahr vor

Gelöst


return row and column indices given 2 values which define a range
Inspired by problem http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice Inputs: - matr...

etwa ein Jahr vor

Gelöst


expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...

etwa ein Jahr vor

Gelöst


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

etwa ein Jahr vor

Gelöst


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

etwa ein Jahr vor

Gelöst


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

etwa ein Jahr vor

Gelöst


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

etwa ein Jahr vor

Gelöst


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

etwa ein Jahr vor

Gelöst


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

etwa ein Jahr vor

Gelöst


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

etwa ein Jahr vor

Gelöst


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

etwa ein Jahr vor

Gelöst


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

etwa ein Jahr vor

Gelöst


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

etwa ein Jahr vor

Gelöst


Combined Ages 4 - Non-symmetric with multiples, n ≥ 3
This problem is slightly more difficult than <http://www.mathworks.com/matlabcentral/cody/problems/42383-combined-ages-3-non-sym...

etwa ein Jahr vor

Gelöst


Outer product of multiple vectors
In tensor algebra, it is often useful to define a tensor as a product of lower order tensors. Similarly, a multidimensional arra...

etwa ein Jahr vor

Gelöst


Combined Ages 3 - Non-symmetric, n ≥ 3
Pursuant to the previous two problems ( <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-...

etwa ein Jahr vor

Gelöst


Animated GIF Creator
This Challenge is to execute the Function Template which has a fully functional Animated GIF creator of a shape related to a Zer...

etwa ein Jahr vor

Gelöst


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

etwa ein Jahr vor

Gelöst


Solve system of equation!
Given provided system of equation, and find x and y. System of equation can be expressed as each term's coefficient. For exam...

etwa ein Jahr vor

Mehr laden