Solved

Count the days

Count the occurrence of a particular day (e.g. Monday) in a given year.

3 días ago

Solved

How long until the weekend?

Write a function a that takes a date vector as an input and returns the number of hours until the weekend begins. The beginning...

3 días ago

Solved

Dots in a Sphere

Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

6 días ago

Solved

Beads on a Necklace (Convex Hulls)

We may describe a <http://en.wikipedia.org/wiki/Convex_hull convex hull> as a rubber band stretched around a list of points. Som...

6 días ago

Solved

Minimum Distance between two N-sided Polygons

This Challenge is to determine the minimum distance between two non-overlapping polygons. The input is a cell array of two vecto...

6 días ago

Solved

Minimum Distance Point to Segment

This Challenge is to determine the minimum distance from a 2-D line segment defined by two points to a point. The point is (p...

6 días ago

Solved

Dots in a Circle

Return how many integer grid points there are inside a circle of radius _r_ centred at (0,0) (including points on the edge). ...

6 días ago

Solved

Edges of a n-dimensional Hypercube

Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n ≥ 0). ...

6 días ago

Solved

Volume of a Simplex

Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

6 días ago

Solved

Find the optimal shape to bring the maximum product by a given perimeter

Find the optimal shape (with Nopt sides, where Nopt is at least 3) to bring the maximum product of the sides length, given a spe...

7 días ago

Solved

Number of lattice points within a circle

Find the number of points (x,y) in square lattice with x^2 + y^2 =< n. This is related to Jame's <http://www.mathworks.com/matla...

9 días ago

Solved

Points on a Sphere

Given a sphere of radius R, determine how many points on the surface of that sphere have three integer coordinates. Do not outp...

9 días ago

Solved

Perimeter

Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

10 días ago

Solved

Geometry: Find Circle given 3 Non-Colinear Points

*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

10 días ago

Solved

Volume difference between Ellipsoid and Sphere

Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

10 días ago

Solved

Property dispute!

Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

10 días ago

Solved

Crossing to Kissing - Untangle the Lines

Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

10 días ago

Solved

Break it up! Break it up!

You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

11 días ago

Solved

Generate binary combinations for a given number of bit(s)

Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

11 días ago

Solved

Find the path through the cell

A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

11 días ago

Solved

Yet Another Path Finder

Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

11 días ago

Solved

possible ways through matrix

This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. C...

11 días ago

Solved

The Number of Ways

Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

11 días ago

Solved

How many rectangles in a grid ?

How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

11 días ago

Solved

Which way to go?

Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

11 días ago

Solved

Number of paths on a n-dimensional grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

12 días ago

Solved

Number of paths on a 3d grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

12 días ago

Solved

Number of paths on a grid

Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

12 días ago

Solved

Path of least resistance - Move all direction

Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

12 días ago

Solved

Path of least resistance

Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

12 días ago