Community Profile

Contact

Professional Interests: data analysis, image processing, simulation

Top 5% contributor

4 downloads

7 years ago

xx yy]=ginput(1); % saves the point to variables xx yy You could use setappdata and getappdata to store the values of the ginpu...

1104 views

Responded 7 years ago

Now I realise this is a known bug http://www.mathworks.com/support/bugreports/details.html?rp=461224 Anyway, the bug report me...

1097 views

Here I am using MATLAB 2008a. This subtle bug is fixed in MATLAB-2009a. Anyway, the way my two classes are defined, the save/loa...

Posted 7 years ago

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

Solve this!

1 month ago

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

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 word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

4 years ago

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 the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

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

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

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

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

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

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

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

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

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

Load more

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries