Solved


Remove the Zero
Given an array n, remove all zeros

2 years ago

Solved


Product of Array
Given an array of numbers. Get the product of the array.

2 years ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

2 years ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

2 years ago

Solved


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

2 years ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

2 years ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

2 years ago

Solved


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

2 years ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

2 years ago

Solved


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

2 years ago

Solved


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

2 years ago

Solved


Sum of first n positive integers
Given n, find the sum of first n positive integers Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55

2 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

2 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

2 years ago

Solved


Max of a Vector
Write a function to return the max of a vector

2 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

2 years ago

Solved


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

2 years ago

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

2 years ago

Solved


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

2 years ago

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

2 years ago

Solved


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

2 years ago

Solved


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

2 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

2 years ago

Solved


Find cross product of 2 vectors
Find cross product of 2 vectors

2 years ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

2 years ago

Solved


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

2 years ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

2 years ago

Solved


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

2 years ago

Solved


select the primes of a vector
Find the prime numbers in a vector

2 years ago

Solved


y equals x divided by 2
function y = x/2

2 years ago

Load more