Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

3 years ago

Solved


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

3 years ago

Solved


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

3 years ago

Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

3 years ago

Solved


How to locate the position of an element in a vector without using the find function
(copy of prob 105 with test for find function) Write a function posX = *locatePos* (x,y) which returns the location o...

3 years ago

Solved


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

3 years ago

Solved


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

3 years ago

Solved


Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

3 years ago

Solved


Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

3 years ago

Solved


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

3 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

3 years ago

Solved


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

3 years ago

Solved


Will there be a new leader?
Simply answer the title.

3 years ago

Solved


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

3 years ago

Solved


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

3 years ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

3 years ago

Solved


Create a vector of the first n natural numbers (★)
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

3 years ago

Solved


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

3 years ago

Solved


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

3 years ago

Solved


Transpose of matrix
Transpose of matrix as per test cases

3 years ago

Solved


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

3 years ago

Solved


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

3 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

3 years ago

Solved


sign function

3 years ago

Solved


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

3 years ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

3 years ago

Solved


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

3 years ago

Solved


Matrix operation

3 years ago

Solved


PIN code

3 years ago

Solved


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

3 years ago

Load more