Solved

Area of a Square

Inside a square is a circle with radius r. What is the area of the square?

9달 ago

Solved

Transpose

Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

9달 ago

Solved

Matlab Basics - Convert a row vector to a column vector

Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

9달 ago

Solved

Matlab Basics - Absolute Value

Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

9달 ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

9달 ago

Solved

Multiply by 3

Given the variable x as your input, multiply it by three and put the result in y.

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

9달 ago

Solved

determine the sum of the squares

if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

9달 ago

Solved

Make a 1 hot vector

Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

9달 ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

9달 ago

Solved

Tell me the slope

Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

9달 ago

Solved

Vector creation

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

9달 ago

Solved

Is the input divisible by 3?

Return true if the input is divisible by 3 and false if not.

9달 ago

Solved

sum of first 'n' terms

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

9달 ago

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

9달 ago

Solved

Evaluating a polynomial

Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

9달 ago

Solved

Matlab Basics - y as a function of x

Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

9달 ago

Solved

Volume of a box

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

9달 ago

Solved

given number is power of n or not?

Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

9달 ago

Solved

vectors counting by 5

Create a vector with numbers from x_min to x_max in increments of 5.

9달 ago

Solved

row removal

Remove the nth row from input matrix M and return the resulting matrix in output N.

9달 ago

Solved

Area of a triangle

A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

9달 ago

Solved

Matlab Basics - Rounding I

Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

9달 ago

Solved

Is it prime?

Given a number, check whether it is prime or not. If prime output is true, otherwise false.

9달 ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

9달 ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

9달 ago