Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

nästan 11 år ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

nästan 11 år ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

nästan 11 år ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

nästan 11 år ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

nästan 11 år ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

nästan 11 år ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

nästan 11 år ago

Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

nästan 11 år ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

nästan 11 år ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

nästan 11 år ago

Solved


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

nästan 11 år ago

Solved


kmph to mps
convert kilometer per hour to meter per second

nästan 11 år ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

nästan 11 år ago

Solved


Find max
Find the maximum value of a given vector or matrix.

nästan 11 år ago

Solved


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

nästan 11 år ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

nästan 11 år ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

nästan 11 år ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

nästan 11 år ago

Solved


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

nästan 11 år ago

Solved


surface of a spherical planet
you just discovered its circumference, that is the input.

nästan 11 år ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

nästan 11 år ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

nästan 11 år ago

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

nästan 11 år ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

nästan 11 år ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

nästan 11 år ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

nästan 11 år ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

nästan 11 år ago