Risolto


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

oltre 3 anni fa

Risolto


Pairwise Euclidean Distance
Given two matrices A,B of dimensions NxK and NxL respectively, calculate the pairwise euclidean distance of all vectors (columns...

oltre 3 anni fa

Risolto


Vector parallel to plane?
Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

oltre 3 anni fa

Risolto


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

oltre 3 anni fa

Risolto


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Get ranking of a combination
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...

oltre 3 anni fa

Risolto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

oltre 3 anni fa

Risolto


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

oltre 3 anni fa

Risolto


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

oltre 3 anni fa

Risolto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1...

oltre 3 anni fa

Risolto


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

oltre 3 anni fa

Risolto


distance to a straight line (2D) given any 2 distinct points on this straight line
Given 2 points P1,P2 on a straight line and a 3rd point, determine the distance of the 3rd point to the straight line. Your answ...

oltre 3 anni fa

Risolto


Do the line-segments intersect?
You are given two line segments. Do they cross? Consider one segment as (x1,y1) to (x2,y2), the other segment as (x3,y3) to (...

oltre 3 anni fa

Risolto


Esoteric Trigonometry
From Wikipedia: "All of the trigonometric functions of an angle θ can be constructed geometrically in terms of a unit circle cen...

oltre 3 anni fa

Risolto


LASER Tracker - Mirror Distance and Angle
Determine the mirror's distance and relative angle to the LASER Tracker given the distances to a reference SMR (Spherical Mounte...

oltre 3 anni fa

Risolto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

oltre 3 anni fa

Risolto


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

oltre 3 anni fa

Risolto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

oltre 3 anni fa

Risolto


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

oltre 3 anni fa

Carica altro