Top 10% contributor
Translates morse code in a wav file to text
2 years ago
Reverse the vector elements.
Input x = [1,2,3,4,5,6,7,8,9]
Output y = [9,8,7,6,5,4,3,2,1]
3 years ago
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...
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
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.
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false.
Given a and b, return the sum a+b in c.
Calculate the nth Fibonacci number.
Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ...
Check if sorted.
Input x = [1 2 0]
Output y is 0
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displa...
Given two lists of numbers, determine the weighted average.
[1 2 3] and [10 15 20]
should result in
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
Input x ...
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Join the conversation