Solved


Alternative Dimensions
Given a multidimensional matrix, transform the matrix so the dimensions are in the order given by variable ord. For example, giv...

4 years ago

Solved


Good Morning :)
Just submit your solution between 05:00:00 and 10:00:00 (AM = Ante Meridiem = Before Noon). _Note : Consider Cody Server Time...

4 years ago

Solved


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and *iterate* until the sum of the digits is a single-digit number. Example: ...

4 years ago

Solved


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

4 years ago

Solved


Draw 'Y'
Draw 'Y' in an x-by-x matrix (where x is odd and x >= 3) Examples: x = 3 y = [1 0 1 0 1 0 0 1 0] x = 5 y = [1...

4 years ago

Solved


Add the number of horizontal and vertical movements to each matrix element
Given n, create a square matrix and with element (1,1) = 1, add 1 to each element for each horitizonal and vertical movement. E...

4 years ago

Solved


Determining if a Degree Sequence is Potentially a Graph
A degree sequence is a list of numbers representing the degrees of vertices in a graph. While it is difficult to tell if a graph...

4 years ago

Solved


Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

4 years ago

Solved


Ramanujan's Number
About 1729 1729 is the first positive integer which can be expressed as the sum of two positive cubes in two different ways. ...

4 years ago

Solved


Check if a matrix Diagonal is equal to its secondary diagonal
Your function should return True if the secondary diagonal is equal to diagonal, and False otherwise. Eg: M = [1 2 1 ...

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

4 years ago

Solved


Create the Ulam spiral
Have you ever seen this wonderful spiral ? The Ulam Spiral is arranging prime numbers in a clockwise spiral starting in 0. Give...

4 years ago

Solved


Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

4 years ago

Solved


Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this: x = 5, y = 1 1 1 1 1 1 0 0 0 0 ...

4 years ago

Solved


Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this: x = 5, y = 1 1 1 1 1 0 0 1 0 0...

4 years ago

Solved


GJam 2011 Africa Qualifier C: House, maximum area rectangle
This Challenge is derived from <http://code.google.com/codejam/contest/837485/dashboard#s=p2 GJam 2011 Africa: Building a House>...

4 years ago

Solved


FizzBuzz
<http://c2.com/cgi/wiki?FizzBuzzTest FizzBuzz Test> The "Fizz-Buzz test" is an interview question designed to help filter out...

4 years ago

Solved


Area of Cylindrical Shell
Consider a cylinder with a non-zero thickness with an inner radius of r1 and an outer radius of r2. If the height of the cylinde...

4 years ago

Solved


continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...

4 years ago

Solved


Portfolio diversification: choose your stocks !
we have the returns of 3 stocks for the last 4 years and we have to combine only 2 stocks that are less correlated. Example: st...

4 years ago

Solved


Are you more familiar with iteration methods or Linear Algebra? Let's see together.
Given a sum result *_x_* value of a *_N_* number of addends, build an array of _*N*_ elements _*y*_ such that the following equa...

4 years ago

Solved


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

4 years ago

Solved


Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

4 years ago

Solved


Reading Web Binary Files (jpg,pdf,tiff,png)
The Challenge is to access a Web binary file, a PDF in this case, and provide the value of a specific byte. . Accessing fi...

4 years ago

Solved


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

4 years ago

Solved


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

4 years ago

Solved


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

4 years ago

Solved


Create a secure password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page requires you to input an id and a passw...

4 years ago

Solved


Find the summation, mean, median, mode and standard deviation of a given array.
An array is given. Find out the summation, mean, median, mode and standard deviation of a given array. If x=[1,2,2,3,3,3,4,4,4,...

4 years ago

Solved


Draw 'P' !!!
Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4) if n=5 , then the output will be [1 1 1 1 1 1 0 0 0...

4 years ago

Load more