已解决


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

4 years 前

已解决


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 years 前

已解决


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4 years 前

已解决


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

4 years 前

已解决


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

4 years 前

已解决


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

4 years 前

已解决


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

4 years 前

已解决


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

4 years 前

已解决


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

4 years 前

已解决


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

4 years 前

已解决


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

4 years 前

已解决


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

4 years 前

已解决


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

4 years 前

已解决


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

4 years 前

已解决


Is this date a palindrome?emordnilap a etad siht sI
Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date ...

4 years 前

已解决


microseconds passed today
Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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)

4 years 前

已解决


Calculate days until Christmas
Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

4 years 前

已解决


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

4 years 前

已解决


Poker Series 02: isQuads
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

4 years 前

已解决


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

4 years 前

已解决


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

4 years 前

已解决


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

4 years 前

加载更多