Top 10% contributor
Checks version control status for a number of files and functions.
4 years ago
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
3 years ago
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
Remove all the vowels in the given phrase.
Input s1 = 'Jack and Jill went up the hill'
Output s2 is 'Jck nd Jll wn...
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
Calculate the nth Fibonacci number.
Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ...
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Provides a possibility to iterate over the items of a map
Join the conversation