Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

1 year ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

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

1 year ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

1 year ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

1 year ago

Solved


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

1 year ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

1 year ago

Solved


to the 2 all elements
to the 2 all elements

1 year ago

Solved


Converts numbers into characters
Converts numbers into characters

1 year ago

Solved


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

1 year ago

Solved


Kinetic energy calculation

1 year ago

Solved


Total energy

1 year ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

1 year ago

Solved


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

1 year ago

Solved


Laws of motion 2

1 year ago

Solved


Laws of motion 5
Calculate the force is u are given mass and acceleration.

1 year ago

Solved


Double all elements in the array
Duplicate all elements in the array

1 year ago

Solved


Find the max element of the array
Find the max element of the array

1 year ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

1 year ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

1 year ago

Solved


Laws of motion 1

1 year ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

1 year ago

Solved


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

1 year ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

1 year ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should be a...

1 year ago

Solved


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

1 year ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

1 year ago

Solved


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

1 year ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

1 year ago

Solved


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

1 year ago

Load more