Top 10% contributor
5 months ago
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
4 years ago
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.
Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
Given a and b, return the sum a+b in c.
Regardless of input, output the string 'yes'.
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displa...
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.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend you select United States from the following list:
See all countries