解決済み


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

5年以上 前

解決済み


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

5年以上 前

解決済み


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

5年以上 前

解決済み


FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

5年以上 前

解決済み


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

5年以上 前

解決済み


Temperature Conversion Utility
There are a few problems on Cody regarding temperature conversion (C to K, C to F, F to C), but none include Rankine. Furthermor...

5年以上 前

解決済み


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

5年以上 前

解決済み


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

5年以上 前

解決済み


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

5年以上 前

解決済み


Find the relation
Take x as input and y as output. If x=1 y=3 If x=2 y=14 If x=3 y=39 If x=4 y=84 Based on this relation find giv...

5年以上 前

解決済み


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more ...

5年以上 前

解決済み


Musical Note Interval 1 - Diatonic Scale
Assuming a simple diatonic C scale, calculate the interval (integer) between two notes (provided as strings). By applying number...

5年以上 前

解決済み


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

5年以上 前

解決済み


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

5年以上 前

解決済み


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

5年以上 前

解決済み


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

5年以上 前

解決済み


Sum of Dividend Digits
Find the smallest number that consist of only number 1's (e.g. 11111111111) which satisfy a given divisor and remainder. Then re...

5年以上 前

解決済み


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

5年以上 前

解決済み


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

5年以上 前

解決済み


Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

5年以上 前

解決済み


Factorions: Numbers that equal the sum of the factorials of their digits
From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

5年以上 前

解決済み


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

5年以上 前

解決済み


Filter British English into American English
Given a sentence written with British spelling, return the sentence with the offending word(s) replaced with the American spelli...

5年以上 前

解決済み


weekday and month
Given a year and a weekday, determine how many months of that year had five of those weekdays. It is kind of easy to find. Ex...

5年以上 前

解決済み


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

5年以上 前

解決済み


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

5年以上 前

解決済み


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

5年以上 前

解決済み


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

5年以上 前

解決済み


Do operation as per given string
Do operation as per given string Example: '3*5' then answer must be 15; '3+5' then answer must be 8; '35' then answer ...

5年以上 前

解決済み


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

5年以上 前

さらに読み込む