Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV'
|
II | I
| ...
3年以上 前
解決済み
Find an inscribed square on a closed curve
Here's an unproven conjecture from geometry: Every simple closed curve in a plane contains all four vertices of some square.
...
3年以上 前
解決済み
Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
3年以上 前
解決済み
Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...
4年弱 前
解決済み
Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...
Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n.
Fun note: technically it...
4年弱 前
解決済み
Dartboard Average I
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...
All capital?
Are all the letters in the input string capital letters?
Examples:
'MNOP' -> 1
'MN0P' -> 0
4年弱 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
4年弱 前
解決済み
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10.
For example, if you add the di...
4年弱 前
解決済み
Find S-parameters of the circuit
Refer to <http://en.wikipedia.org/wiki/Scattering_parameters> for the information about the system of scattering parameters.
...
4年弱 前
解決済み
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...
4年弱 前
解決済み
Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
4年弱 前
解決済み
Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
4年弱 前
解決済み
Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector).
Example:
Inpu...
4年弱 前
解決済み
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.
Pi Estimate 1
Estimate Pi as described in the following link:
<http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>
4年弱 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
4年弱 前
解決済み
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...