解決済み

Convert to Binary Coded Decimal

Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

7ヶ月 前

解決済み

Big numbers, least significant digits

Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

7ヶ月 前

解決済み

Big numbers, repeated least significant digits

This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

7ヶ月 前

解決済み

Evened up (or not)

You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

7ヶ月 前

解決済み

With apologies to William Blake

Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

7ヶ月 前

解決済み

De-primed

Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

7ヶ月 前

解決済み

Split bread like the Pharaohs - Egyptian fractions and greedy algorithm

How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

7ヶ月 前

解決済み

Math with Roman Numerals

Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

7ヶ月 前

解決済み

Convert Roman to Arabic Numerals

Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

7ヶ月 前

解決済み

Test if a Number is a Palindrome without using any String Operations

*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

7ヶ月 前

解決済み

7 segment LED display

Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

7ヶ月 前

解決済み

Ripping numbers apart!

So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

7ヶ月 前

解決済み

Decode a simplified barcode

Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

7ヶ月 前

解決済み

Make a simplified barcode

Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

7ヶ月 前

解決済み

Increment a number, given its digits

Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

7ヶ月 前

解決済み

Number of 1s in the Binary Representation of a Number

*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

7ヶ月 前

解決済み

Numbers in extended form

Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

7ヶ月 前

解決済み

Converting numbers back from extended form

Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

7ヶ月 前

解決済み

Additive persistence

Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

7ヶ月 前

解決済み

Reverse Calculator

Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

7ヶ月 前

解決済み

Guess the number I'm thinking of

In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

7ヶ月 前

解決済み

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

7ヶ月 前

解決済み

Balanced Ternary Numbers: Easy as |, |-, |o

This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...

7ヶ月 前

解決済み

String Array Basics, Part 3: Convert Cell Array with Missing Values to String Array

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

7ヶ月 前

解決済み

String Array Basics, Part 4: Convert String Array with Missing Values to Cell Array

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

7ヶ月 前

解決済み

String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

7ヶ月 前

解決済み

Words Count: A Cell Array Approach

Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

7ヶ月 前

解決済み

Words Count: A String Array Approach

Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

7ヶ月 前

解決済み

Use a timetable to analyze a train timetable (Part 5)

You are analyzing a train timetable (you have some time to kill since you just missed your train!) How many trains depart each d...

7ヶ月 前

解決済み

Use a timetable to analyze a train timetable (Part 3)

Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston ...

7ヶ月 前