Community Profile

Contact

Top 1% contributor

Has anyone found an answer to this? I'm having the same problem and can't figure out how to undo it

1017 views

Posted 3 years ago

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

Solve this!

2 years ago

In this problem , you must convert a cell into a matrix and pad each cell with NaN. *Example 1:* If you have the input...

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

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

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

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

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

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

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

If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

you just discovered its circumference, that is the input.

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

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

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

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

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

Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

inner product of two vectors

The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

Load more