0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as
f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...
9年以上 前
解決済み
find a number (cheat)
find a number input^5 = input
the out put should be the number. try cheating
9年以上 前
解決済み
Change input vector
If a input vector is [3, 2, 6, 1, 6], the output vector is [3, 2, 6, 1, 6] + [1, 2, 3, 4, 5] = [4, 4, 9, 5, 11].
9年以上 前
解決済み
cheating technique2
there are some ways to get hints just by looking at the test suits to cheat. try.
9年以上 前
解決済み
make an eye matrix which element is 1:n
for a given input n, make an n by n matrix which contains elements 1:n
for example
input =5
output = [1 0 0 0 0;0 2 0 0 0; 0...
9年以上 前
解決済み
determine if
determine if the elements of a matrix is a nan and return true
9年以上 前
解決済み
cheating technique1
in these cody problems, there is a way to cheat.
find out how people cheat.
9年以上 前
解決済み
find the 'M'
for an input x, return 1 at the location of the letter 'M'
Replicate and Tile an Array
Replicate and tile an array.
Example
A = [1 2 3; 4 5 6; 7 8 9]
B = Epli_and_Tile(A,1,2)
B = [ 1 2 3 1...
9年以上 前
解決済み
Flipping a Matrix
Flipping matrix up and down.
If a central row is exists, leave it, and flip remaining rows.
Example
Mat = magic(3)
...
9年以上 前
解決済み
Where is the number that you want to find?
For a given matrix A, find where the input number x appears.
Do this task by returning the vector which contains the row and th...
Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_.
Note: NaNs are equal and there may be n...
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...
9年以上 前
解決済み
Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...