Solved

Miles to go before I sleep

Recently, my car's odometer passed 56789. Given an odometer reading, output how many miles need to be driven to get the next mi...

2 years ago

Solved

Is it a mail?

Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mo...

2 years ago

Solved

Hackathon: the beginnings

I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

2 years ago

Solved

Pull the variable y_correct from the Caller's Workspace

*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

2 years ago

Solved

Initialize a varible with an integer value from a another variable which is assigned with a character value.

Initialize a varible with an integer value from a another variable which is assigned with a character value. ex: Test = 'c'...

2 years ago

Solved

Remove TeX from string

Matlab’s TeX support in figure windows is great for displaying information in a visually appealing way. However, many of the TeX...

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

2 years ago

Solved

The last non-zero digit of a factorial

For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

2 years ago

Solved

Track Logic

A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

2 years ago

Solved

Dealfun (1.0)

*Short description.* Write a function _dealfun_: [y1,y2,...,yn]=dealfun(fhandle,x1,x2,...,xn) which evaluates the f...

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

2 years ago

Solved

Repopulate the City

For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

2 years ago

Solved

count upper and lower case characters

In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

2 years ago

Solved

UICBioE240 2.7

Given two 3-element vectors x1 and x2, create a 3 x 3 x 3 matrix Y where (:,:,1) has all values of x1 * x2, (:,:,2) has all valu...

2 years ago

Solved

last n digit of a power function

Calculate the power of a given a base, exponent. Return the last n digit number. Example 1: base = 3; expo = 8; n = 3; ...

2 years ago

Solved

Looking for Squares

Need n squares that equal one square all together, none zero, none fractured. For example, calling squares(2) should output [16...

2 years ago

Solved

Number construction III

Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

2 years ago

Solved

3D indexes

Generalisation in 3 dimensions of the <http://nl.mathworks.com/matlabcentral/cody/problems/43117-2d-indexes Problem 43117. 2D I...

2 years ago

Solved

Sum of unique multiples of 3 and 5

If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...

2 years ago

Solved

Free Fall analytical solution (Chapra 2012 textbook Example 1.1)

Analytical solution to bungee jumper problem. Given time series as a vector, parameters mass and drag coefficient, and gravit...

2 years ago

Solved

Fixed-Point Iteration

Perform fixed-point iteration to estimate the root of a nonlinear equation.

2 years ago

Solved

GJam 2014 Qualifier: Deceitful War (Small)

This Challenge is derived from <http://code.google.com/codejam/contest/2974486/dashboard#s=p3 GJam 2014 Qualifier Deceitful War>...

2 years ago

Solved

Sum of big primes without primes

Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

2 years ago

Solved

Primes Faster for Large N

This Challenge is to improve the "primes" function for speed. This may be accomplished by fixing memory usage. The Matlab fun...

2 years ago

Solved

Minimum Sum thru a Lower Triangle

This Challenge is to find the minimum cumulative sum that traverses from row-1 thru row-N via vertical/diagonal adjacent element...

2 years ago

Solved

GJam 2015 Rd1B: Noisy Neighbors

This Challenge is derived from <https://code.google.com/codejam/contest/8224486/dashboard#s=p1 GJam 2015 Rd 1B: Noisy Neighbors>...

2 years ago

Solved

String Find with Wildcards of a Cell array

Given a cell array of strings and a search string with single character (?) or multiple character (*) wildness return the indice...

2 years ago

Solved

GJam 2015 Rd1B: Counter Culture

This Challenge is derived from <https://code.google.com/codejam/contest/8224486/dashboard#s=p0 GJam 2015 Rd 1B: Counter Culture>...

2 years ago

Solved

Fast 1-D Convolution (same shape)

Pursuant to the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolutio...

2 years ago

Solved

GJam 2014 China Rd A: Read Phone Number (Large)

This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number>. Lar...

2 years ago