Solved


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

10 years ago

Solved


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

10 years ago

Solved


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.

10 years ago

Solved


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

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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


Back to the future II
See test suite

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


Kwabna
add two numbers

10 years ago

Load more