Solved

Average of corner elements of a matrix (★★)

(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

2 months ago

Solved

Generate a vector which contains a pyramid pattern (★★★★)

Generate a vector that contains terms that follows a pyramid pattern up to the nth row: 1 2 2 3 3 3 4 4 4 4 ...

2 months ago

Solved

Doubling elements in a vector (★★)

(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

2 months ago

Solved

Create times-tables (★★★)

(copy of prob 33) At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 ti...

2 months ago

Solved

Column Removal (★★★)

(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

2 months ago

Solved

Swap the first and last columns (★★)

(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

2 months ago

Solved

Select every other element of a vector (★★)

(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

2 months ago

Solved

Sum of elements in a vector (★)

(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

2 months ago

Solved

Sum of elements of a vector (★★★)

Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

2 months ago

Solved

Magnitude of a vector (★★★)

Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by <<htt...

2 months ago

Solved

Volume of Equilateral Triangle Prism

Find volume of equilateral triangle prism x = side of triangle l = length of prism

2 months ago

Solved

Kelvin to Fahrenheit

You can find a doc about it in here => https://www.rapidtables.com/convert/temperature/how-kelvin-to-fahrenheit.html x is kelvi...

2 months ago

Solved

Convert Angstrom to Meters

Write a code that converts the angstrom unit to meters.(A is angstrom and m is meters.)

2 months ago

Solved

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

2 months ago

Solved

Fill a zeros matrix (★★★★★)

(Copy of Problem 830) The aim is to fill an array of all zeros given a numerical value and the index of row and columns for t...

2 months ago

Solved

*Prime number check 2 (in construction)

Another way to see if a number is prime is to count the number of factors. For example, the number 4 has 2 factors, [ 2 4 ]...

2 months ago

Solved

Median computation (★★★)

See easy edition of this problem. However, now you must compute the median of any real-valued vector without using the in-built...

2 months ago

Solved

Median computation (★)

Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

2 months ago

Solved

Variance computation (★)

Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

2 months ago

Solved

Variance computation (★★★)

Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

2 months ago

Solved

Mo money, mo math #2! (★★★)

(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

2 months ago

Solved

Approximate functions 1 (★★★)

Compute the following sum for any given x and positive integer n. <<https://i.imgur.com/eUwXdSE.gif>> <> Here m! denote...

2 months ago

Solved

Prime number check (★★)

One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

2 months ago