Solved

Create a matrix map of increasing safety levels

The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

7 mesi ago

Solved

Count the number of folds needed to pack a large sheet

In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

7 mesi ago

Solved

Calculate the sphericity of a Raschig ring

Sphericity is a measure of the roundness of any particle. It was defined by Wadell in 1935 as the ratio of the 'surface area of ...

7 mesi ago

Solved

N-th permutation.

Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ... ...

7 mesi ago

Solved

Which permutation is it?

Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ....

8 mesi ago

Solved

Get ranking of a combination looking for speed.

I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

8 mesi ago

Solved

Usage of java.math : N Choose K with unlimited precision

Calculate the binomial coefficient nchoosek with full accuracy. This challenge may use the wonderful word of java.math that allo...

8 mesi ago

Solved

NCHOOSEK - Time Optimization

*Input* * *V* —— Set of all choices, a vector of N, 1 < N < 100 * *K* —— Number of selected choices, a scalar, 0 <= K <=...

8 mesi ago

Solved

Create Combination

Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

8 mesi ago

Solved

Next lexicographic - permutation

Find next lexicographic - permutation (permutations as it would occur in a dictionary order). E.g: nextP('ABCD') = ABDC If you...

8 mesi ago

Solved

Square root

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

8 mesi ago

Solved

Calculate the average value of the elements in the array

Calculate the average value of the elements in the array

8 mesi ago

Solved

the average value of the elements

Calculate the average value of the elements in the array

8 mesi ago

Solved

Rescale Scores

Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

8 mesi ago

Solved

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

8 mesi ago

Solved

Find the Best Hotels

Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

8 mesi ago

Solved

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

8 mesi ago

Solved

Crop an Image

A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

8 mesi ago

Solved

Calculate BMI

Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

8 mesi ago

Solved

Plot Damped Sinusoid

Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

8 mesi ago

Solved

Calculate a Damped Sinusoid

The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

8 mesi ago

Solved

Solve a System of Linear Equations

*Example*: If a system of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

8 mesi ago

Solved

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

8 mesi ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

8 mesi ago