Solved

Matrix Quadrants

Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

26 dagen ago

Solved

Calculate the mean of each half of a matrix

Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

26 dagen ago

Solved

Determine if x is a combination of m and n

Given positive integers x, m, and n, determine if x can be written as x = am + bn for any (non-negative) integers a and b. Your ...

26 dagen ago

Solved

Cumulative maximum of an array

Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...

26 dagen ago

Solved

Cantor counting

Find the nth cantor's rational number. the sequence is given below in the link. Sequence: 1/1,1/2,2/1,3/1,2/2,1/3,1/4... ... .....

6 maanden ago

Solved

Connect Four - 02

Previous Problem <https://www.mathworks.com/matlabcentral/cody/problems/45354-connect-four-01> In addition to previous proble...

6 maanden ago

Solved

find location of indexes

Given a vector with integer values. Find the edge location of the stream of same value. For example: A=[0 0 0 1 1 1 1 2 2 ...

6 maanden ago

Solved

String Logic 6

Examples: 'CAT' --> 216 'DOG' --> 218 'ROSY' --> 333 'MATLAB' --> 433 'TRUST' --> 418 'MOSTLY' --> 488

6 maanden ago

Solved

String Logic 3

Example: 'CAT' --> 'RPI' 'DOG' --> 'SDV' 'MATLAB' --> 'BPIAPQ' 'ROSY' --> 'GDHN' 'TRUST' --> 'IGJHI' 'MOSTLY' --> 'BDHI...

6 maanden ago

Solved

String Logic 4

Example: 'CAT' --> 'IGZ' 'DOG' --> 'JUM' 'MATLAB' --> 'SGZRGH' 'ROSY' --> 'XUYE' 'TRUST' --> 'ZXAYZ' 'MOSTLY' --> 'SUYZ...

6 maanden ago

Solved

String Logic 5

Example: 'CAT' --> 'TAC' 'DOG' --> 'GOD' 'MATLAB' --> 'BALTAM' 'ROSY' --> 'YSOR' 'TRUST' --> 'TSURT' 'MOSTLY' --> 'YLTS...

6 maanden ago

Solved

Remove Upper Case Letters

Example Matlab --> atlab proBlem --> prolem Enter --> nter

6 maanden ago

Solved

Swap Characters of a Single Word

Description: In the given input word, convert the lower case to upper case and vice versa. A to a, a to A ... Example: 'Matl...

6 maanden ago

Solved

PACMAT - G03 Ghosts use minimum path to PACMAT; 3 Lives

The Classic PACMAN game brought to Cody. PACMAT requires clearing the board of Yellow Dots while not bumping into the wanderi...

6 maanden ago

Solved

Connect Four - 01

Connect four is a two player board game. <https://en.wikipedia.org/wiki/Connect_Four> Given a complete connect-four board,...

6 maanden ago

Solved

Castling-01

Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

6 maanden ago

Solved

STOP that car!!!

The maximum allowed speed for this road is 100. Find the cars that didn't observe the speed limit Arrest and fine them!!!

6 maanden ago

Solved

Random Problem14 - Multiply a vector by a scalar of 2

Multiply a vector by a scalar of 2

6 maanden ago

Solved

Get the n-th rand number with given seed

Given seed s, return the n-th rand number using rand(). Round the answer with 4 digits. n is a postive integer.

6 maanden ago

Solved

Height of a 3D Pyramid

If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

6 maanden ago

Solved

Determine the Result of a Move in Reversi

Note: This is closely related to <http://www.mathworks.com/matlabcentral/cody/problems/2538-find-the-next-legal-move-in-reversi ...

7 maanden ago

Solved

Restricted Multiplication v1

This problem is Restricted Addition v4 with multiplication and more restrictions. multiply two inputs without use of common ari...

7 maanden ago