Solved


Knights and Knaves (part 2)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> _logical puzzles_. ...

8 years ago

Solved


Knights and Knaves (part 1)
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

8 years ago

Solved


Retirement savings
At the start of what year will you have reached or exceeded a savings goal? Parameters (all are constant scalars given in a s...

8 years ago

Solved


Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...

8 years ago

Solved


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

8 years ago

Solved


Put m balls into n boxes (again)
According to <http://www.mathworks.com/matlabcentral/cody/problems/1516-put-m-balls-into-n-boxes Cody Problem 1516>, if I put 3 ...

8 years ago

Solved


Convert single-precision floating-point number to binary representation
Write a function which takes a scalar <http://en.wikipedia.org/wiki/Single-precision_floating-point_format single-precision floa...

8 years ago

Solved


Xor of matrix
you have to set exclusive OR of two arrays

8 years ago

Solved


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

8 years ago

Solved


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

8 years ago

Solved


Aztec Diamond Domino Tilings
Consider a Cartesian grid, with verteces at integer x and y values, where every four vertices around a vacant space define a uni...

8 years ago

Solved


You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

8 years ago

Solved


Damping of Servomotors with Tachometer Feedback
In Control Engineering, servomotors with tachometer feedback can be modeled by the second order system K / [J*s^2 + (B + K*K...

8 years ago

Solved


Nash Equilibrium
In game theory, a player's *strategy* is any of the options that can be chosen in a setting where the pay-off depends not only o...

8 years ago

Solved


Let's Make A Deal: Criminal Minds
The game of Let's Make A Deal proceeds as follows; The player is given the choice of three doors: Behind one door is a car; b...

8 years ago

Solved


Exponents in Factorials(hard)
This is problem is a harder version of "Problem 44747. Exponents in Factorials". <https://ww2.mathworks.cn/matlabcentral/cody/p...

8 years ago

Solved


Exponents in Factorials
It's time to get excited about numbers!!! Well, we're just dealing with factorials here, but it's still a good reason to get ex...

8 years ago

Solved


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

8 years ago

Solved


GJam: 2013 Rd1a Bullseye Painting
<http://code.google.com/codejam/contests.html Google Code Jam> 2013 Round 1a Bullseye challenge is to determine how many full ri...

8 years ago

Solved


Days until next NewYear ball drop
Given a date string in the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', calculate the number of *days* until the dropping of the ...

8 years ago

Solved


Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what a...

8 years ago

Solved


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

8 years ago

Solved


How long until the weekend?
Write a function a that takes a date vector as an input and returns the number of hours until the weekend begins. The beginning...

8 years ago

Solved


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

8 years ago

Solved


How Many Months Until It's Today Again?
Given a particular date, calculate how many months must pass before that same day of the month occurs on the same day of the wee...

8 years ago

Solved


Friday the 13th
According to superstition, lots of unpleasant stuff happens on Friday the 13th, so you might like to find the next occurence of ...

8 years ago

Solved


Find Month & day for given day number of a year
Find Month & day for given day number of a year (day number is any number ranging from 1 to 366)

8 years ago

Solved


Create a Cell array of month-end date strings within a provided date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

8 years ago

Solved


Create a Cell array of month-end date strings within a date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

8 years ago

Solved


Get an array of month-ends in a date range
Create a function that would return a list of month-ends falling in a given date range. If a start date or end date falls on a...

8 years ago

Load more