Top 5% contributor
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...
3 years ago
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2...
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...
Remove the nth column from input matrix A and return the resulting matrix in output B.
A = [1 2 3; 4 5 6];
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...
Given a and b, return the sum a+b in c.
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
Input x ...
Regardless of input, output the string 'yes'.
Given the input n, return true if n is odd or false if n is even.
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.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries