Solved

Return the sequence element II

Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

2 days ago

Solved

Annoying population

Every year the number of annoying persons in the office triples Found the population, given a(0) and t

2 days ago

Solved

Convert decimal to binary and then generate the minimum binary it can with jumbling

input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

2 days ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

2 days ago

Solved

Basic commands - Greatest common divisor

Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

2 days ago

Solved

"Low : High - Low : High - Turn around " -- Create a subindices vector

Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

2 days ago

Solved

"Find out the best cricket"

This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

2 days ago

Solved

cross in array

Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

2 days ago

Solved

Balanced number

Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

2 days ago

Solved

Building matrices

If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

2 days ago

Solved

Multiples of a Number in a Given Range

Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

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

3 days ago

Solved

Replace NaNs with the number that appears to its left in the row.

Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

3 days ago

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

3 days ago

Solved

Return the largest number that is adjacent to a zero

This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

3 days ago

Solved

Take a binary number as input,rearrange it in any manner such that its value is greater than the original one.output should be all the possible values in decimal.

a='001' output = [4,2]

3 days ago

Solved

Pangrams!

A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

3 days ago

Solved

Word Distance - Sum

Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

3 days ago

Solved

letter yes yes & letter no no

Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

3 days ago

Solved

Calculate the values of a polynomial.

Calculate the values of a polynomial.Input parameter p - vector of polynomial coefficients, x - matrix of the argument values. ...

3 days ago

Solved

First non-zero element in each column

For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

3 days ago

Solved

number of groups

In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

3 days ago

Solved

Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath

Assumed that each bubble has practically the same diameter d. Given total number n of bubbles. Find volume v of breath.

3 days ago

Solved

Check if inputted variable is a string or a number

Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).

3 days ago

Solved

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

3 days ago