A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

environ 4 ans il y a

A résolu


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

environ 4 ans il y a

A résolu


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

environ 4 ans il y a

A résolu


length of a vector
Find twice the length of a given vector.

environ 4 ans il y a

A résolu


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

environ 4 ans il y a

A résolu


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;

environ 4 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

environ 4 ans il y a

A résolu


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

environ 4 ans il y a

A résolu


Array of Ones
Create a 100 X 100 array of ones.

environ 4 ans il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

environ 4 ans il y a

A résolu


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...

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

environ 4 ans il y a

A résolu


Given A4 sizes find A3's long side
I think you know the relation between A3 and A4 paper so givens are sides of A4 x1=long side of A4 y1=short side of A4 y2 is ...

environ 4 ans il y a

A résolu


Spherical Volume
Calculate the volume of a sphere.

environ 4 ans il y a

A résolu


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

environ 4 ans il y a

A résolu


Multiply pi
Multiply pi with x!

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Divide pi
Divide pi by x!

environ 4 ans il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

environ 4 ans il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

environ 4 ans il y a

A résolu


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

environ 4 ans il y a

A résolu


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

environ 4 ans il y a

A résolu


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

environ 4 ans il y a

A résolu


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

environ 4 ans il y a

A résolu


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

environ 4 ans il y a

A résolu


Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.

environ 4 ans il y a

A résolu


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

environ 4 ans il y a

A résolu


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

environ 4 ans il y a

Charger plus