Risolto

Find common elements in matrix rows

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

oltre 2 anni fa

Risolto

It dseon't mettar waht oedrr the lrettes in a wrod are.

An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

oltre 2 anni fa

Risolto

Given two arrays, find the maximum overlap

Given two arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. If s1 = [1 2 3 4 5]...

oltre 2 anni fa

Risolto

QWERTY coordinates

Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and it...

oltre 2 anni fa

Risolto

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

oltre 2 anni fa

Risolto

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

oltre 2 anni fa

Risolto

Mandelbrot Numbers

The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

oltre 2 anni fa

Risolto

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

oltre 2 anni fa

Risolto

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre 2 anni fa

Risolto

Prime factor digits

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

oltre 2 anni fa

Risolto

Find relatively common elements in matrix rows

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

oltre 2 anni fa

Risolto

Get the area codes from a list of phone numbers

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

oltre 2 anni fa

Risolto

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

oltre 2 anni fa

Risolto

Word Counting and Indexing

You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

oltre 2 anni fa

Risolto

Interpolator

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

oltre 2 anni fa

Risolto

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

oltre 2 anni fa

Risolto

Find the maximum number of decimal places in a set of numbers

Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

oltre 2 anni fa

Risolto

Make roundn function

Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

oltre 2 anni fa

Risolto

Rounding off numbers to n decimals

Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

oltre 2 anni fa

Risolto

Matlab Basics - Rounding III

Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

oltre 2 anni fa

Risolto

Matlab Basics - Rounding II

Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

oltre 2 anni fa

Risolto

Check that number is whole number

Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

oltre 2 anni fa

Risolto

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

oltre 2 anni fa

Risolto

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

oltre 2 anni fa

Risolto

MATLAB Basic: rounding II

Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

oltre 2 anni fa

Risolto

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

oltre 2 anni fa

Risolto

Convert a vector into numbers

Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

oltre 2 anni fa

Risolto

Find the longest match inside two strings

Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

oltre 2 anni fa

Risolto

Broken numlock key, oppps !

The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

oltre 2 anni fa

Risolto

Flip the bit

Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

oltre 2 anni fa