Solved


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

9 months ago

Solved


select the primes of a vector
Find the prime numbers in a vector

9 months ago

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

9 months ago

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

9 months ago

Solved


Magic!
Check whether the input matrix is a normal magic square: http://en.wikipedia.org/wiki/Magic_square Output the logical value tr...

9 months ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

9 months ago

Solved


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

9 months ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

9 months ago

Solved


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

9 months ago

Solved


Calculate the base-10 logarithm of a number
Calculate the logarithm of number x

9 months ago

Solved


Determine if a row vector has NaN
Determine if a row vector x has NaN

9 months ago

Solved


factorial of a number x
Factorial of a number x

9 months ago

Solved


Juros Simples
Faça uma função que calcule o montagem de um investimento com juros simples que receba como argumentos o capital inicial C, a ta...

9 months ago

Solved


Calories in a slice of pizza?
The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...

9 months ago

Solved


Energy of a photon
&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883 Given the frequency F of a photon in giga hertz. Find energy E of this photon...

9 months ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

9 months ago

Solved


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

9 months ago

Solved


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

9 months ago

Solved


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

9 months ago

Solved


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

9 months ago

Solved


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

9 months ago

Solved


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

9 months 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

9 months ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

9 months ago

Solved


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

9 months ago

Solved


Solve the matrix equation AXB + X + C = 0 for X
Let A, B, and C be square matrices of equal size, and let the matrix X be defined by the matrix equation A * X * B + X + ...

9 months ago

Solved


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

9 months ago

Solved


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

9 months ago

Solved


P(girl likes you | she smiled at you)
Compute the probability Given the input probabilities

9 months ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

9 months ago

Load more