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

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

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

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

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

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

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

25 days ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

25 days ago

Solved


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

25 days ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

25 days ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

25 days ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

25 days ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

25 days ago

Solved


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

25 days ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

26 days ago

Solved


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

26 days ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

26 days ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

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

1 month ago

Solved


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

1 month ago

Solved


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

1 month ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

1 month ago

Solved


swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...

1 month ago

Solved


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

1 month ago

Solved


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

1 month ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

1 month ago

Solved


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

1 month ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

1 month ago

Solved


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

1 month ago

Solved


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

1 month ago

Load more