Solved


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

4 years ago

Problem


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: A 3x3 rectangle can be filled with 1x1 and 2x2 tiles in f...

4 years ago | 2 | 22 solvers

Solved


RandomProblem13-Cube a number
Cube a number

4 years ago

Solved


Random Problem12- Squaring a number
Square the number

4 years ago

Solved


Multiply by 3
Multipy the thingy by 3

4 years ago

Solved


RandomProblem32
Solve for the answer

4 years ago

Solved


RandomProblem33
Solve for the answer.

4 years ago

Solved


Chess performance
After Problems <http://www.mathworks.com/matlabcentral/cody/problems/3054-chess-elo-rating-system/ 3054> and <http://www.mathwor...

4 years ago

Solved


Two functions (to be sure)
I want to compute the number of odd/even numbers in an array. But I want the results by two different functions. Example: ...

4 years ago

Solved


Get a Fibonacci number's index.
*N.B.* For the purpose of this exercise, the first Fibonacci number is 1, and the second is 2; that is, |fib(1) = 1| and |fib(2)...

4 years ago

Solved


Matlab Basics II - Operations and Matrix Dimensions
Write a function that takes two inputs, a & b, and outputs the sum and product of the two matrices. The matrices have OPPOSITE d...

4 years ago

Solved


Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

4 years ago

Solved


Square Rooting a Number
This MATLAB Cody exercise requires you to take a number x, square root it, and get y

4 years ago

Solved


prime consecutive sums
Create a number sequence of 1 to n, such that the sums of every two consecutive numbers are all primes. E.g. if n = 5, you may ...

4 years ago

Solved


Play Tic-Tac-Toe: Easy Bots
Interactive Tic-Tac-Toe game versus the test suite algorithms. The contest will be 50 games of Computer first and 50 games of...

4 years ago

Solved


Uranium–Lead Dating

4 years ago

Solved


n-th digit of write-down all numbers
Write down number as 123456789101112131415161718192021222324252627282930... what's the n-th digit? input n and get the digit.

4 years ago

Solved


Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

4 years ago

Solved


First use of arrayfun() and anonymous function @(x)
Create an anonymous function using @(x) for a parabola equation for the given coefficients stored in s with s(1)x2 + s(2)x + s(...

4 years ago

Solved


Count of Unique Elements of a Vector
Count the number of times each unique element appears in a vector. Example: Input x = [2 9 1 2 4 9 2] Output y = [1 1; 2 3; 4...

4 years ago

Solved


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

4 years ago

Solved


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

4 years ago

Solved


Dispatch and collect
Write a function that dispatches the single argument _x_ to multiple function handles (varargin) and concatenates vertically the...

4 years ago

Solved


LocateMembership | Membership of Matrix in another matrix
Let a and b be given by a = [ 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 4 0 0 0 ] b = [ 2 1 ...

4 years ago

Solved


Alternative Scoring. Create an incremental spiral.
This problem is created to test an alternative Cody scoring system. It is based on the current one, but few changes are introduc...

4 years ago

Solved


Convert a grayscale image into RGB colour format, preserving data type
In the Image Processing Toolbox, MATLAB provides rgb2gray to convert a 3 channel color image into a 1 channel intensity...

4 years ago

Solved


Text Processing - New
Derived from problem 2440. A string containing several sentences are given as input. If any sentence contains the word 'great...

4 years ago

Solved


Best Square-Shaped Grid for Subplot
If you have x number of plots, find the optimum 'm' number of rows and 'n' number of columns for subplotting where the overall f...

4 years ago

Solved


Sum of digit range
Example: If A is n1, and B is n2 digit positive numbers. A*B's digit range will be [c d] (c = min & d = max). Then return ...

4 years ago

Solved


I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

4 years ago

Load more