A résolu


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

plus de 10 ans il y a

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

plus de 10 ans il y a

A résolu


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

plus de 10 ans il y a

A résolu


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

plus de 10 ans il y a

A résolu


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

plus de 10 ans il y a

A résolu


Times 32
X is given as your variable. Y is your output multiplied by 32 Example x=1 y=1x32=32

plus de 10 ans il y a

A résolu


How to make y half of x
Making y equal to x/2.

plus de 10 ans il y a

A résolu


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

plus de 10 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus de 10 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 10 ans il y a

A résolu


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

plus de 10 ans il y a

A résolu


Find the square root of a value
Given the variable x as your input, find the square root and let the result be represented by y Examples: Input x = 4 O...

plus de 10 ans il y a

A résolu


Cody Computer Part 3 - Detect the graphic card used on Cody Computer
In the Cody computer investigation party, you may have already solved : <http://www.mathworks.com/matlabcentral/cody/problems...

plus de 10 ans il y a

A résolu


Back to the Future III
Marty McFly and Doc Brown are "back" again. See the test suite to see what they are up to.

plus de 10 ans il y a

A résolu


Back to the future II
See test suite

plus de 10 ans il y a

A résolu


Back to the future
See test suite See also: http://www.mathworks.com/matlabcentral/cody/problems/2449-back-to-the-future-ii

plus de 10 ans il y a

A résolu


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

plus de 10 ans il y a

A résolu


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

plus de 10 ans il y a

A résolu


Can you beat the lottery again (for hardcore coder) ?
Inspired by the Problem 1713 by Chris E. Here is the code that generates the first lottery number: rng('shuffle'); numb...

plus de 10 ans il y a

A résolu


Collaborative Fun : Nomination
Series of problems have been presented in Cody aiming at collaborative fun. This problem is based on Alfonso's problem #2825 - P...

plus de 10 ans il y a

A résolu


Find my secret number
I try to hide a secret number in the workspace amongst others variables. I am paranoid so I change his value and his name a...

plus de 10 ans il y a

A résolu


pay it forward
THIS PROBLEM IS BEING RESCORED, PLEASE WAIT Return any number (integer between 0 and 65535) You will pass this problem if ...

plus de 10 ans il y a

A résolu


What is the scope of variables in Matlab ?
How to do this little hack ? a=10; b=5; y=change_var(a,1); assert(isequal(a,1))

plus de 10 ans il y a

A résolu


Become the leader
The goal of this problem is the same as the goal of the rest of them: *become the leader*. Actually, you can only solve this ...

plus de 10 ans il y a

A résolu


Hackathon - String version
I have a function that creates a random string of characters of ASCII values 32-127. The length of the string is also randomly ...

plus de 10 ans il y a

A résolu


Hack not this Test Suite you will
Another Hack 10000 Challenge. I am thinking of an integer between 1 and 10000. Return a value between 1 and 10000. I ma...

plus de 10 ans il y a

A résolu


sum of digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 ...

plus de 10 ans il y a

A résolu


Kwabna
add two numbers

plus de 10 ans il y a

Charger plus