Solved


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

5 months ago

Solved


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rotati...

5 months ago

Solved


Placing Beads Neatly in a Box
You are given a string of n black and white beads. Your job is to pack them neatly into a square box. "Neatly" in this case mean...

5 months ago

Solved


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

5 months ago

Solved


RISK Calculator - Large Armies, High Accuracy, Fast
This Challenge is to quickly provide the high precision probability of legal RISK battles up to 100 vs 100. [ Attack >= 2 and D...

5 months ago

Solved


RISK board game battle simulation
Given two positive integer inputs, a (attacker army units) and d (defender army units) return the probablity of victory (from 0....

5 months ago

Solved


Game of Nim
The Game of Nim is a famous studied 2 player strategy game. <http://en.wikipedia.org/wiki/Nim> There are 3 heaps, and you...

5 months ago

Solved


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

5 months ago

Solved


Pentago: find winning move
<http://en.wikipedia.org/wiki/Pentago Pentago> is a challenging two-player strategy game. The objective is to be the first playe...

5 months ago

Solved


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

5 months ago

Solved


The MATLAB Treasure Hunt – Unlock the Final Chamber by Solving the Ancient Numeric Cipher
You’ve reached the Final Chamber, where a glowing pedestal displays a sequence of numbers. The inscription reads: “Only the su...

5 months ago

Solved


The MATLAB Treasure Hunt – Escape the Labyrinth of Logic by Unlocking the Correct Door Sequence
You enter the Labyrinth of Logic, where each door opens only if a secret rule is met. A vector of integers represents door code...

5 months ago

Solved


The MATLAB Treasure Hunt – Locate the Hidden Treasure in the Chamber of Coordinates
Inside the Chamber of Coordinates, glowing runes show several coordinate points on a 2D grid. The treasure lies closest to the ...

5 months ago

Solved


The MATLAB Treasure Hunt – Cross the River of Ratios by Finding Successive Proportions in the Data Stream
Following the glowing script, you arrive at the River of Ratios — a flowing stream of numbers. A carved message on the rocks re...

5 months ago

Solved


The MATLAB Treasure Hunt – Decode the Ancient Script by Removing Strange Symbols from the Message
Emerging from the Maze of Numbers, you find a tablet etched with symbols and letters — an Ancient Script! The message is hidden...

5 months ago

Solved


The MATLAB Treasure Hunt – Identify the Hidden Pattern Within the Maze of Numbers
The compass leads you to an underground chamber covered in numbers carved into the walls — a maze of digits that glows in myster...

5 months ago

Solved


The MATLAB Treasure Hunt – Fix the Broken Compass by Normalizing Its Angle Readings
Your compass, recovered from the Hidden Cave, spins wildly! The ancient device shows angles that exceed 360° or drop below 0°. T...

5 months ago

Solved


The MATLAB Treasure Hunt – Count Matching Symbols on the Ancient Scroll to Unlock the Next Clue
Inside the Hidden Cave, you discover an ancient scroll filled with strange symbols and markings. A note beside it says: “Count ...

5 months ago

Solved


The MATLAB Treasure Hunt – Extract the Hidden Cave’s Coordinates from a Long List of Numbers
After decoding the first clue, you uncover another piece of parchment — a long list of numbers. At first glance, it looks random...

5 months ago

Solved


The MATLAB Treasure Hunt – Decode the First Clue Hidden in a Jumbled Sequence of Numbers
You discover an ancient parchment inside the college archives. It contains a jumbled sequence of numbers that seems meaningless ...

5 months ago

Solved


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

5 months ago

Solved


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

5 months ago

Solved


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

5 months ago

Solved


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

5 months ago

Solved


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

5 months ago

Solved


function on a moving window
Create a function that applies an operation (such as @sum, @mean, @std, @norm etc) to a moving window of the data. First exampl...

5 months ago

Solved


Flexible Anonymous Function
Given a function handle, return a handle to a function that would accept an arbitrary number of inputs, applies the function to ...

5 months ago

Solved


Make an anonymous function that has variable output
Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

5 months ago

Solved


Apply Function to Each Field of a Structure Array: Part 2
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

5 months ago

Solved


Apply Function to Each Field of a Structure Array: Part 1
The builtin <http://www.mathworks.com/help/matlab/ref/structfun.html?=structfun structfun> applies a function handle to each fie...

5 months ago

Load more