Risolto


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

oltre 7 anni fa

Risolto


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

oltre 7 anni fa

Risolto


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

oltre 7 anni fa

Risolto


Poker Series 07: IsTwoPair
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

oltre 7 anni fa

Risolto


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

oltre 7 anni fa

Risolto


Poker Card Deal!
Anyone want to play a card game? Well this is making one deck of cards, with the option of using 2 jokers. The outputs are ...

oltre 7 anni fa

Risolto


Frequency Analysis of Text
Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

quasi 8 anni fa

Risolto


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

circa 8 anni fa

Risolto


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

circa 8 anni fa

Risolto


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

circa 8 anni fa

Risolto


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

circa 8 anni fa

Risolto


Kurosu Solver
This problem is related to <https://www.mathworks.com/matlabcentral/cody/problems/44657-kurosu-checker Problem 44657>. The ga...

circa 8 anni fa

Risolto


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

circa 8 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

circa 8 anni fa

Risolto


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

circa 8 anni fa

Risolto


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

circa 8 anni fa

Risolto


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

circa 8 anni fa

Risolto


basic matrix operations: rotate and find sum of diagonal elements of the resultant matrix
For given input matrix a, rotate it by 90 degrees and find the sum of the diagonals. Example: Input: a = 1 ...

circa 8 anni fa

Risolto


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

circa 8 anni fa

Risolto


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

circa 8 anni fa

Risolto


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1 . example: x=4 ans= [0 1 1 1 1 0 0 0 ...

circa 8 anni fa

Risolto


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

circa 8 anni fa

Risolto


Clock Solitaire
Many card players will be familiar with the game of <http://en.wikipedia.org/wiki/Clock_patience Clock Solitaire>. Briefly, th...

oltre 8 anni fa

Risolto


SET (the card game)
<http://www.setgame.com/set/index.html SET> is a card game in which players try to find valid 3-card sets from 12 cards on the t...

oltre 8 anni fa

Risolto


Mongean Shuffle : 2
Extension to <https://www.mathworks.com/matlabcentral/cody/problems/2479-mongean-shuffle problem 2479>: Determine the number...

oltre 8 anni fa

Risolto


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

oltre 8 anni fa

Risolto


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

oltre 8 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 8 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 8 anni fa

Risolto


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

oltre 8 anni fa

Carica altro