Solved


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

6 years ago

Solved


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

6 years ago

Solved


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

6 years ago

Solved


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

6 years ago

Solved


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

6 years ago

Solved


Square
X is a number, write a code, where Y should be the square of X.

6 years ago

Solved


Multiply pi
Multiply pi with x!

6 years ago

Solved


Divide pi
Divide pi by x!

6 years ago

Solved


Create a matrix that counts up diagonally
Given a single input _N_, create a _N_ x _N_ matrix that counts from 1 : _N_ ², (along up-right diagonals, starting with 1 in th...

6 years ago

Solved


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

6 years ago

Solved


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

6 years ago

Solved


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

6 years ago

Solved


Trace the path of a harmful chemical in an ecological network
An ecological network consists of the cycles of nature, such as the water cycle, the carbon cycle, the oxygen cycle, etc. Due to...

6 years ago

Solved


Find the fastest reaction chain to reach a target compound
This problem is related to Problem <45470>. Let's denote a list of *N* compounds as 1, 2, ..., *N*. You are then given a list...

6 years ago

Solved


List the households affected by leaks in water distribution
Consider the following water distribution network, where water is pumped uni-directionally from left to right: 8...

6 years ago

Solved


Place wastewater treatment processes in the correct order
There are many technologies for treating wastewater. For example, grit chambers are used to remove heavy solids, filtration is u...

6 years ago

Solved


What gear ratio does the cyclist need?
A cyclist (perhaps including our famed Codysolver the cyclist <http://www.mathworks.com/matlabcentral/cody/players/1841757-the...

6 years ago

Solved


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

6 years ago

Solved


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

6 years ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

6 years ago

Solved


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

6 years ago

Solved


An asteroid and a spacecraft
&#128640 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

6 years ago

Solved


Inscribed Pentagon? 2
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

6 years ago

Solved


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

6 years ago

Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

6 years ago

Solved


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

6 years ago

Solved


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

6 years ago

Solved


number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

6 years ago

Solved


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

6 years ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

6 years ago

Load more