Product of Array
Given an array of numbers. Get the product of the array.
2年弱 前
解決済み
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
2年弱 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
2年弱 前
解決済み
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年弱 前
解決済み
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年弱 前
解決済み
First N Perfect Squares
*Description*
Return the first N perfect squares
*Example*
input = 4;
output = [ 1 4 9 16 ];
2年弱 前
解決済み
Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.
2年弱 前
解決済み
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...
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年弱 前
解決済み
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年弱 前
解決済み
Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.
Max of a Vector
Write a function to return the max of a vector
2年弱 前
解決済み
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年弱 前
解決済み
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年弱 前
解決済み
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年弱 前
解決済み
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416