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

Solved


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

5 months ago

Solved


Matrix to 3-Column Matrix
Consider a matrix *A* such as A = [1 2 3 3 4 5 6; 2 3 4 5 6 7 8]; Can you convert this matrix to a three-column ...

5 months ago

Solved


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

5 months ago

Solved


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

5 months ago

Solved


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

5 months ago

Solved


Moving Product (Easy)
Given an input array A, write a function *movprod(A,k,dim)* to calculate the moving product over a sliding window of length *k* ...

5 months ago

Solved


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

5 months ago

Solved


Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...

5 months ago

Load more