Solved

multiply an array by its position number

You have given an array. Multiply an array by its position number

3 years ago

Solved

find the Area of a rectangle

length is x width is y what is the area of the rectangle?

3 years ago

Solved

Prime number removal

remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

3 years ago

Solved

Calculating selling price

Cost of a Product is $x What should be the selling price if you want to gain 10%?

3 years ago

Solved

Zero Cross

Write a function that counts the number of times n a signal x crosses zero or changes sign. Examples x = [1 2 -3 -4 5 6 ...

3 years ago

Solved

Vector with a repeated entry

Create a row vector of length n, filled with 4's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

3 years ago

Solved

If you have matrix A, create matrix B using matrix A as an "element"

A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

3 years ago

Solved

Area of a circle

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

3 years ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.

If x = 5, y = 5 * (5+5) * 5 = 250

3 years ago

Solved

Given the variable x as your input, multiply it by four, then divide it by two. Then put the result in y.

If x = 5, y = 4*5/2 = 10

3 years ago

Solved

Perimeter of a square

Find a function for the perimeter of a square where x equals a side length

3 years ago

Solved

Find longest run

Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

3 years ago

Solved

Free-time Equation

Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

3 years ago

Solved

Determine the product of the vector

Determine the product of a given vector if you multiply the vector by 2.

3 years ago

Solved

Rotate Matrix @180 degree

Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

3 years ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

3 years ago

Solved

테스트

다음과 같은 벡터를 1,2,2,3,3,3,4,4,4,4 만드는 사용자 정의 함수 your_fcn_name 을 작성하시오. 이 벡터는 그 숫자가 그 갯수 만큼 있다. 예) 만일 입력 n=3이면 3까지...

3 years ago

Solved

Replace values out of an interval with the lower or upper values

For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

3 years ago

Solved

Height of a right-angled triangle

Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

3 years ago

Solved

Crunch that matrix!

You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

3 years ago