Problème


Return fibonacci sequence do not use loop and condition version 3
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

plus de 11 ans il y a | 2 | 12 solveurs

A résolu


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

plus de 11 ans il y a

A résolu


Increase monotonically
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

plus de 11 ans il y a

A résolu


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

plus de 11 ans il y a

A résolu


Create Circular Perfect Square Sequence
A sequence v(1:N) made of values 1:N can be created for N>31 such that v(i)+v(i+1) is a perfect square. The sum of v(N)+v(1) mus...

plus de 11 ans il y a

A résolu


Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

plus de 11 ans il y a

A résolu


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

plus de 11 ans il y a

A résolu


Create a fixed format text output
Given a short brief matrix, such as x = [1.2 2.4 3.6; 1.5 2.3 3.5; 1.35 2.35 3.65] and a label 13, create a fixed format text o...

plus de 11 ans il y a

A résolu


Knots Contest: Score (TestSuite)
This Challenge is to Score well on the <http://www.mathworks.com/matlabcentral/contest/contests/38/rules Knots contest> test sui...

plus de 11 ans il y a

A résolu


Path Optimization thru N words : Time Optimization
This is an extension of <http://www.mathworks.com/matlabcentral/cody/problems/196-love-is-an-n-letter-word Cody 196 love> with ...

plus de 11 ans il y a

A résolu


Capture the flag(s)
Flags are distributed randomly on a large board. Starting from the corner position your goal is to capture as many flags as poss...

plus de 11 ans il y a

A résolu


Perform Rubik's Cube Moves
A standard Rubik's Cube is shown in 3-D and also unfolded to identify the specific Tile-face numbering. The faces are White-U...

plus de 11 ans il y a

A résolu


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

plus de 11 ans il y a

A résolu


Design matrix from eigenvalues
Write a function that takes one input argument n and outputs a (n x n) square matrix A with the following properties: -A has...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


make a 10x10 vector of random numbers between 1 and 1000 and convert it into a 10x10 of all zeros
function heck_yes y = randi(10,1000) Converted = zeros(y)

plus de 11 ans il y a

A résolu


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

plus de 11 ans il y a

A résolu


summation of the reciprocals
Determine the summation of the reciprocals of numbers with length equal to N,in the meanwhile there is a digit K excluded from t...

plus de 11 ans il y a

A résolu


DNA Pattern Match: Performance Metric - Speed
The Challenge is to Rapidly find matches of DNA sequences, Length=6, in a 1,800,000 long DNA file. At <http://imacst.com/issu...

plus de 11 ans il y a

A résolu


Text File Read: 64 bit data set
This Challenge is to read a text file that has vary large integers up to 2e18, typical for <http://code.google.com/codejam/conte...

plus de 11 ans il y a

A résolu


GJam 2014 China Rd A: Read Phone Number
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number>. Sma...

plus de 11 ans il y a

A résolu


Penny Flipping: Reverse subsets of a sequence of coins until you recover the original configuration
The original Penny Flipping Problem (PF-1) starts with a stack of N pennies arranged with all the coins heads up. The first oper...

plus de 11 ans il y a

A résolu


Unique: Enhanced Performance - Avoiding Memory Crash
The Challenge is to create the unique array for a long and wide array. Difficulties are that the normal unique(a,'rows') func...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


Yet Another Path Finder
Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

plus de 11 ans il y a

A résolu


Path of least resistance - Move all direction
Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

plus de 11 ans il y a

A résolu


Hamming Weight - Fast
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

plus de 11 ans il y a

A résolu


Hamming Weight - Size Scoring
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

plus de 11 ans il y a

A résolu


Split up vector or matrix delimited by NaNs
Given several vectors contained within one vector delimited by NaNs, return each individual vector as an element of a cell vecto...

plus de 11 ans il y a

A résolu


jogging?
Imagine x-y coordinate system and you are at the origin and your partner is on the x-axis at some small distance (d) away from y...

plus de 11 ans il y a

Charger plus