Solved


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

6 years ago

Solved


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

6 years ago

Solved


SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.

6 years ago

Solved


Squares of odd numbers upto a given range
Find the squares of odd numbers upto a given range. If Given x=6 return y=(1^2,3^2,5^2) y=1,9,25 If Given x=5 retu...

6 years ago

Solved


Convert a vector to a lower triangular matrix
I now have a row vector and I want to convert it to a lower trilangular matrix. The rows of the lower trilangular matrix have...

6 years ago

Solved


Repeat string n times
* You will be provided a string (s = 'string1_') * a starting point (num1 = 6) (always bigger than or equal to zero) * and n (...

6 years ago

Solved


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

6 years ago

Solved


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

6 years ago

Solved


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

6 years ago

Solved


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

6 years ago

Solved


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

6 years ago

Solved


Lah Numbers
Create a square lower diagonal matrix containing the first n Lah number coefficients. In mathematics, the Lah numbers are coeffi...

6 years ago

Solved


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

6 years ago

Solved


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

6 years ago

Solved


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

6 years ago

Solved


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

6 years ago

Solved


Mobius function
From <http://en.wikipedia.org/wiki/Möbius_function wikipedia>: For any positive integer n, define μ(n) as the sum of the prim...

6 years ago

Solved


Sphenic number sequence
<http://oeis.org/A007304 Sphenic numbers> are positive integers that are products of three distinct prime numbers: 30, 42, 66, 7...

6 years ago

Solved


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

6 years ago

Solved


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

6 years ago

Solved


Palindrome numbers
Find the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.

6 years ago

Solved


Chess ELO rating system
The Elo rating system is a method for calculating the relative chess skill levels of players in competitor-versus-competitor gam...

6 years ago

Solved


Modulation index
The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.

6 years ago

Solved


Tony's trick for duplicating an mx1 vector n times
Without using repmat, or for loop, or concatenation, create a function to duplicate a vector, v, a specified number of times, n....

6 years ago

Solved


Words Count: A Cell Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

6 years ago

Solved


Words Count: A String Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

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

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

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

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

6 years ago

Load more