Community Profile

photo

Lesandu Wenitha Sugathadasa


Last seen: 5 días ago
308 total contributions since 2020

I love aircrafts and jets

Contact

Lesandu Wenitha Sugathadasa's Badges

  • MATLAB Central Treasure Hunt Finisher
  • Knowledgeable Level 1
  • First Answer
  • Leader
  • Curator
  • CUP Challenge Master
  • Explorer
  • 5-Star Galaxy Level 1
  • First Submission
  • Draw Letters
  • First Review
  • Speed Demon
  • Creator
  • Promoter
  • Introduction to MATLAB Master

View all

Contributions in
View by

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

11 días ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

11 días ago

Solved


Count the days
Count the occurrence of a particular day (e.g. Monday) in a given year.

13 días ago

Solved


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

23 días ago

Solved


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

23 días ago

Solved


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

alrededor de 1 mes ago

Solved


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

alrededor de 1 mes ago

Solved


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

alrededor de 1 mes ago

Solved


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

alrededor de 1 mes ago

Solved


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

alrededor de 1 mes ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

alrededor de 2 meses ago

Solved


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

alrededor de 2 meses ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

alrededor de 2 meses ago

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

alrededor de 2 meses ago

Solved


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

alrededor de 2 meses ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

alrededor de 2 meses ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

alrededor de 2 meses ago

Solved


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

alrededor de 2 meses ago

Solved


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

alrededor de 2 meses ago

Solved


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)

alrededor de 2 meses ago

Solved


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

alrededor de 2 meses ago

Solved


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

2 meses ago

Solved


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

2 meses ago

Solved


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

2 meses ago

Solved


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

2 meses ago

Solved


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

2 meses ago

Solved


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

2 meses ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

2 meses ago

Load more