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


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


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


Determine Center of Mass for a Set of Floating Spheres
Each sphere has a position determined by theta (x,y plane angle) and tau (elevation angle) as well as L, the distance of the cen...

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


Matrix rotation
You are given a 2D matrix of dimension [m,n] and a positive integer r. You have to rotate the matrix r times and print the resul...

4 years ago

Solved


Solve an ODE: nonlinear third-order equation
Write a function to solve the ordinary differential equation on the domain with , , and either or . The input variable ord ...

4 years ago

Solved


Truncatable Prime
A truncatable prime is a leading digit is successively removed, then all resulting numbers are prime. Wiki When given a number...

4 years ago

Solved


Circle Division
A circle can be divided into 2 sections, by placing 2 points in arbitrary locations along its circumference and drawing a straig...

4 years ago

Solved


Evaluate Poker Hand
Given an input table of card values and card suits between five and thirteen cards, choose the best five cards and output the ra...

4 years ago

Solved


Determine whether a player solved a Cody problem
Write a function to determine whether a player has solved the specified Cody problems. The problem numbers are specified as a ve...

4 years ago

Solved


find the second element of array
easy find the second element

4 years ago

Solved


Vector to Decimal
Given an integer vector , return its decimal representation as a character array. % Examples v = 7 x = '7' % v = [4 2] x...

4 years ago

Solved


Easy Sequences 67: Project Euler Problem 1 - Not Again!!!
You know the drill... Given two integers and , with , find the sum of all positive integers below , that are multiples of any ...

4 years ago

Solved


Solve an ODE: first-order linear equation
In the fall semester of [redacted], my professor for a course on ordinary differential equations said, “There are two groups of ...

4 years ago

Solved


Easy Sequences 60: Almost Cube Root
The almost cube root of an integer , is the largest possible integer , such that and . For example , then , since and since th...

4 years ago

Solved


Easy Sequences 65: Fractional Part of Square Roots
The fractional part function of a positive real number , denoted as , is defined as: , where , is the 'floor' of . Thus, , and ...

5 years ago

Solved


Binpack Contest: Retro
The <http://www.mathworks.com/matlabcentral/contest/contests/3/rules Full Binpack Rules and examples>. This Challenge is a re...

5 years ago

Solved


Classify product/digit-sum sequences
Cody Problem 53120 involved a sequence in which a term is computed by multiplying the previous two terms and adding the digits o...

5 years ago

Solved


Compute the effective conductivity of more heterogeneous aquifers
Cody Problem 52070 asked for a function to compute the effective hydraulic conductivity of a heterogeneous aquifer—or the single...

5 years ago

Solved


Check whether a Wordle guess is consistent with previous feedback
The game Wordle resembles the classic game Mastermind. Players try to guess a five-letter word, and after each guess they are to...

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

5 years ago

Solved


Easy Sequences 64: Base-14 Arithmetic Function
For an integer , the base-14 arithmetic function, , is defined as follows: Convert to base-14, using the letters '' for digits...

5 years ago

Solved


Wordle
Wordle is an english game where you need to guess a 5 letter word. For each guess you'll receive a feedback for the placement of...

5 years ago

Solved


Time reverse indices
Time reverse the index values as follows IndexIn = [7 1 0] IndexOut = [7 6 0] Note that the indices are zero based and so...

5 years ago

Solved


Easy Sequences 66: Fractional Part of Sum of Consecutive Powers over a Prime
Given three postive integers, , and , create the function , defined as follows: Where is the th prime and the s...

5 years ago

Solved


Sum of two number using (regexp, varargin) comand?
Sum two number a &b and get there result in c using the rexp and varargin comand.

5 years ago

Solved


Backgammon #5 - Valid Move?
A previous problem in this occasional series (Problem 45967) set up a possible representation of a backgammon board: White ston...

5 years ago

Solved


List the dopey numbers
If vile numbers have binary representations that end with an even number of zeros (even vile), then numbers with binary represe...

5 years ago

Solved


Basic: fft
Calculate the value using fft

5 years ago

Load more