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

2 months 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 ag...

2 months ago

Solved


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

2 months ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

2 months ago

Solved


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

2 months ago

Solved


Convert RGB triplet to ColorSpec string
This is the inverse to <http://www.mathworks.com/matlabcentral/cody/problems/42612-convert-colorspec-string-to-rgb-triplet this ...

2 months ago

Solved


Convert ColorSpec string to RGB triplet
Given a ColorSpec string, either in short or long form, return the corresponding RGB triplet. If the input is not a valid color,...

2 months ago

Solved


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

2 months ago

Solved


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

2 months ago

Solved


Use a timetable to analyze a train timetable (Part 5)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) How many trains depart each d...

2 months ago

Solved


Use a timetable to analyze a train timetable (Part 3)
Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston ...

2 months ago

Solved


Use a timetable to analyze a train timetable (Part 4)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) What is the average daily tri...

2 months ago

Solved


Use a timetable to analyze a train timetable (Part 2)
Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Yo...

2 months ago

Solved


Problem Set 2
Make a calculator by the four main operators (op): + - * / And the two numbers (n1, n2). Don't forget to check to divisio...

2 months ago

Solved


Problem Set 1
You will get the vector "v", you should put it's length in a variable called "lngth", then... If it's length from 1 to 5, sz = ...

2 months ago

Solved


Switch-Case-Otherwise
You should make random numbers to 10, by 3 rows and 3 columns. Cases from 1 to 3, b = true. Otherwise, b = false.

2 months ago

Solved


NOT
If a not equal to zero, b = true, else, b = false.

2 months ago

Solved


OR
If a greater than zero or c less than 10, b = true, else, b = false.

2 months ago

Solved


AND
If a greater than 0 and n less than 10, b = true, else, b = false. (Checking a should be in one line by AND special sign in MAT...

2 months ago

Solved


Nested If(s)
If a greater than zero, then check, if a = greater that 1 and less than 10, then b = true, else, b = false.

2 months ago

Solved


If-Elseif-Else
If a more than zero, b = true, if a = zero , b = zero, else, b = false.

2 months ago

Solved


If-Else
If a more than zero, b = true, else, b = false.

2 months ago

Solved


If
If a more than zero, then b = true.

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

2 months ago

Solved


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

2 months ago

Solved


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

2 months ago

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

2 months ago

Solved


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

2 months ago

Load more