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ヶ月 前

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ヶ月 前

The End of the World
given a date -- represent it in the Maya long count system. <https://en.wikipedia.org/wiki/Maya_calendar> <https://maya.nm...

4ヶ月 前

Lost days
Given two dates in a particular format, calculate the difference between them.

4ヶ月 前

Find the day for a date
Today's day and date will be given to you. By utilising that you need to find the day of the old date. (Date will be in DD/MM/YY...

4ヶ月 前

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ヶ月 前

Datetime basics
Generate the datetime scalar representing the current date

4ヶ月 前

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

4ヶ月 前

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

4ヶ月 前

Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

4ヶ月 前

Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

4ヶ月 前

Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

4ヶ月 前

Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

4ヶ月 前

Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

4ヶ月 前

Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

4ヶ月 前

Array ex-OR
There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

4ヶ月 前

Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

4ヶ月 前

Round up to π

4ヶ月 前

Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

4ヶ月 前

Draw a '4' in a zero matrix!

4ヶ月 前

Draw a '6' in a zero matrix!

4ヶ月 前

Draw a '9' in a zero matrix!

4ヶ月 前

Draw a '7' in a zero matrix!

4ヶ月 前

Draw a '8' in a zero matrix!

4ヶ月 前

Draw a '3' in a zero matrix!

4ヶ月 前

Draw a '2' in a zero matrix!

4ヶ月 前

Draw a '5' in a zero matrix!

4ヶ月 前

Draw a '1' in a zero matrix!

4ヶ月 前