A résolu


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

presque 9 ans il y a

A résolu


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

presque 9 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

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

presque 9 ans il y a

A résolu


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

presque 9 ans il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

presque 9 ans il y a

A résolu


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

presque 9 ans il y a

A résolu


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

presque 9 ans il y a

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

presque 9 ans il y a

A résolu


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

presque 9 ans il y a

A résolu


Space Saver
Remove all characters that are below a space in ASCII value.

presque 9 ans il y a

A résolu


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

presque 9 ans il y a

A résolu


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

presque 9 ans il y a

A résolu


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

presque 9 ans il y a

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

presque 9 ans il y a

A résolu


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

presque 9 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

presque 9 ans il y a

A résolu


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

presque 9 ans il y a

A résolu


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

presque 9 ans il y a

A résolu


Self-Description
This is a simplified version of the <http://xkcd.com/688/ *xkcd comic* by the same name>. Simply return the angle (in degrees...

presque 9 ans il y a

A résolu


Free passes for everyone!
THIS PROBLEM IS TEMPORALLY DECOMMISSIONED WHILE IT IS UPDATED. PLEASE WAIT _Simply return the name of the coolest numerical c...

presque 9 ans il y a

A résolu


feeling VERY lucky?
Just like Matthew's problem <http://www.mathworks.com/matlabcentral/cody/problems/2793 2793> and Edward's problem <http://www.ma...

presque 9 ans il y a

A résolu


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

presque 9 ans il y a

A résolu


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

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

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

presque 9 ans il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

presque 9 ans il y a

A résolu


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

presque 9 ans il y a

A résolu


Halder function
Find the halder function value of a number

presque 9 ans il y a

A résolu


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

presque 9 ans il y a

Charger plus