Solved


Easy Sequences 77: Powers of Fibonacci Numbers
Given integers and , we are asked to evaluate the following function: . That is, equals raised to the power of the -th Fibona...

3 years ago

Solved


Easy Sequences 75: Easy as Pisano Pi
Pisano period , of an integer , is the period in which the sequence of Fibonacci numbers modulo repeats. For example it is not ...

3 years ago

Solved


Easy Sequences 74: Fibonacci Bank Account
In fantasy world where money does grow on trees, a man decided to top-up his bank account, daily. On the first day he noticed th...

3 years ago

Solved


Easy Sequences 73: Emergence of Fibonacci Insects
Cicadas are natural mathematicians. In order to avoid their natural predators (in this case, the wasp), they emerge from hiberna...

3 years ago

Solved


Easy Sequences 43: Least Common Fibonacci Number
The Fibonacci sequence is a series whose elements are numbers starting with and , and subsequent Fibonacci numbers are defined...

3 years ago

Answered
How to search for substring in cell array and get the corresponding index then?
If I'm understanding correctly, cellfun(@numel,strfind(string(val),"EXPERIMENT")) will give you a matrix with 1's where th...

3 years ago | 0

Solved


Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...

3 years ago

Solved


Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...

3 years ago

Solved


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

3 years ago

Solved


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

3 years ago

Solved


Create block matrix of integers (j+k-1) - Part II
Given m, n, p, and q, create an m-by-n matrix made up of submatrices, each sized p-by-q (if possible - the last row and column o...

3 years ago

Solved


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

3 years ago

Solved


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

3 years ago

Solved


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

3 years ago

Solved


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. Fun note: technically it...

3 years ago

Solved


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

3 years ago

Solved


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

3 years ago

Solved


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

3 years ago

Solved


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

3 years ago

Solved


Math with Roman Numerals
Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

3 years ago

Solved


Construct a "diagAdiag" matrix
Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

3 years ago

Solved


love is an n-letter word
Given a list of *N words*, return the *N-letter word* (choosing one letter from each word) with the property of having the least...

3 years ago

Solved


Reverse Boggle
*Description* In the classic Parker Brothers game <http://en.wikipedia.org/wiki/Boggle Boggle>, players find words from a 4x4...

3 years ago

Solved


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

3 years ago

Solved


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

3 years ago

Solved


Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...

3 years ago

Solved


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

3 years ago

Solved


Easy Sequences 7: Easy as Composite Pi
The prime Pi function is defined as the number of prime numbers from 1 to a certain given limit. In MATLAB, it is easy to create...

3 years ago

Solved


Easy Sequences 37: Natural Factorable Polynomials
A polynomial of the form: , for , is said to be natural factorable if it can be factored into products of first degree binomials...

3 years ago

Load more