Solved


Get a Fibonacci number's index.
*N.B.* For the purpose of this exercise, the first Fibonacci number is 1, and the second is 2; that is, |fib(1) = 1| and |fib(2)...

2 years ago

Solved


Place numbers
Given two input first input is a matrix which consist of the index numbers of the second input vector. You place the second inpu...

2 years ago

Solved


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

2 years ago

Solved


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

2 years ago

Solved


Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...

2 years ago

Solved


Primes for Large N: 2^30, System Memory Limit
This Challenge is to further improve the "primes" function for speed/memory usage to the Limit of Cody Memory. The Matlab fun...

2 years ago

Solved


2048 tile game
The popular 2048 game has been implemented here: http://gabrielecirulli.github.io/2048/ Given the board like this: [2...

2 years ago

Solved


Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6]). If (n=3) you will return following; [ 1 NaN NaN NaN ...

2 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 (n = 3)...

2 years ago

Solved


MATLAB Basics: Complex Argument
For a given complex number, x, return the argument, y, in degrees.

2 years ago

Solved


Sum multiples

2 years ago

Solved


Triple function composition
Given three functions f,g and h, create the composed function y=f(g(h)). Example f = @(x) x+1 g = @(x) x/2 h = @(x) ...

2 years ago

Solved


Alternate elements!
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

2 years ago

Solved


Rescaling vector
Rescale the entries of a vector x so that it spams [a,b]. The new values should be linearly stretched into the new range. _Ex...

2 years ago

Solved


Create Truth Table of Size according to input
Create a Truth Table Example: n = 3 output = [0 0 0; 0 0 1; 0 1 0; 0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1]

2 years ago

Solved


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

2 years ago

Solved


Rule of mixtures (composites) - other bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

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

2 years ago

Solved


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

2 years ago

Solved


Surface Fit z(x,y)
Given three vectors x,y,z. Find four coefficients c = [cxx cxy cyy c00], such that z = cxx*x.^2+cxy*x.*y+cyy*y.^2+c00. For e...

2 years ago

Solved


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

2 years ago

Solved


Out-of-Place Elements Count
Determine the number of elements in a list of integers that are not in their original order after sorting the list in ascending ...

2 years ago

Solved


Find the triplet
Given an array x of size n > 3 and an integer N, return the indices of three elements in the array that sum up to the given inte...

2 years ago

Solved


Find Next Strictly Greater Element
Given an array of numbers, create a new array where each element represents the next strictly greater element to the right of th...

2 years ago

Solved


Find the largest sum of any contiguous subarray
Given an array of N integers, find the contiguous subarray (which must contain at least one number) with the maximum sum and ret...

2 years ago

Solved


Battery Charge Indicator
Write a function called battery_charge that visually represents the charge of a battery. The function takes an integer paramete...

2 years ago

Solved


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

2 years ago

Solved


Absolute Sorting
Given an array with various numbers, your have to sort it by absolute value in ascending order. For example, for the array [-2...

2 years ago

Load more