A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus d'un an il y a

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

plus d'un an il y a

A résolu


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

plus d'un an il y a

A résolu


Mean ignoring NaNs
Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values be...

plus d'un an il y a

A résolu


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

presque 2 ans il y a

A résolu


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

presque 2 ans il y a

A résolu


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

presque 2 ans il y a

A résolu


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

presque 2 ans il y a

A résolu


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

presque 2 ans il y a

A résolu


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

presque 2 ans il y a

A résolu


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

presque 2 ans il y a

A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

presque 2 ans il y a

A résolu


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

presque 2 ans il y a

A résolu


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

presque 2 ans il y a

A résolu


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

presque 2 ans il y a

A résolu


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

presque 2 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

A résolu


leap year
find the number of leap years within the given time interval

presque 2 ans il y a

A résolu


Friday or not
I love Friday. Please tell me whether the day is Friday. Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'. Exa...

presque 2 ans il y a

A résolu


Datetime basics
Generate the datetime scalar representing the current date

presque 2 ans il y a

A résolu


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

presque 2 ans il y a

A résolu


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

A résolu


Day counter function
Write a function called _day_counter_ that returns the number of Mondays that fell on the first day of the month in a given year...

presque 2 ans il y a

A résolu


Count the days
Count the occurrence of a particular day (e.g. Monday) for a given duration.

presque 2 ans il y a

A résolu


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

presque 2 ans il y a

Charger plus