Community Profile

Contact

Top 1% contributor

Hi, I can't put my finger on why it's doing this, but since a few days help takes a lot of time to show. Either inline (selecti...

0 Answers

0

Asked 2 years ago

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

Solve this!

2 years ago

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

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

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

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

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

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

Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

Load more