Community Profile

Contact

Top 5% contributor

Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

Solve this!

1 year ago

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

2 years ago

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

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

Function must convert the input vector x composed of 0 and 1 (length is a multiple of 8) in hexadecimal. Most significant bit is...

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

Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

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.

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

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

4 years ago

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

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

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

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

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

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

Regardless of input, output the string 'yes'.

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

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

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

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

Load more

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend you select United States from the following list:

See all countries