해결됨

Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

3달 전

해결됨

Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

3달 전

해결됨

Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

3달 전

해결됨

Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

3달 전

해결됨

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

3달 전

해결됨

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

3달 전

해결됨

matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

3달 전

해결됨

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

3달 전

해결됨

Convert a temperature reading from Celsius to an unknown scale
Two of the most famous temperature scales are the Celsius and the Fahrenheit scale. In reality, however, there are so many other...

3달 전

해결됨

Compute the missing quantity among P, V, T for an ideal gas
Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law appli...

3달 전

해결됨

Assess the scatter of wind turbines in a field
The renewable energy industry is on the rise in many countries--- and one of the key players is wind energy. It is believed ...

3달 전

해결됨

Construct a "diagAdiag" matrix
Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

3달 전

해결됨

Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

3달 전

해결됨

Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

3달 전

해결됨

expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

3달 전

해결됨

Sideways sum
Given natural number calculate its _population count_.

3달 전

해결됨

Concatenate strings
concatenate a variable number of input strings to produce one outputstring

3달 전

해결됨

geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

3달 전

해결됨

arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

3달 전

해결됨

Largest Geometric Series
Extension of Ned Gulley's wonderful <http://www.mathworks.com/matlabcentral/cody/problems/317 Problem 317>. In a geometric se...

3달 전

해결됨

Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

3달 전

해결됨

Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

3달 전

해결됨

Sort the prime numbers in each row of a 3x3 matrix
Considering a 3x3 matrix A, sort the prime numbers of each row in ascending order. For exemple: input A=[5 8 2 4; ...

3달 전

해결됨

Spot the rectangle (Part 2)
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://www.mathworks....

3달 전

해결됨

Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

3달 전

해결됨

Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

3달 전

해결됨

Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

3달 전

해결됨

Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

3달 전

해결됨

Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

3달 전

해결됨

Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

3달 전

Load more