**Statistics**

RANK**683**

of 242 869

REPUTATION**82**

CONTRIBUTIONS

**1** Question

**23** Answers

ANSWER ACCEPTANCE **
100.0%
**

VOTES RECEIVED**18**

RANK**116** of 16 985

REPUTATION**9 088**

AVERAGE RATING**4.50**

CONTRIBUTIONS**17** Files

DOWNLOADS **270**

ALL TIME DOWNLOADS**86911**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Solved

Vectorize the digits of an Integer

Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

ungefär 9 år ago

Solved

Summing digits

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

mer än 9 år ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

mer än 9 år ago

Solved

Swap the first and last columns

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

mer än 9 år ago

Solved

Return the largest number that is adjacent to a zero

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

mer än 9 år ago

Solved

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

mer än 9 år ago

Solved

Find the longest sequence of 1's in a binary sequence.

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

mer än 9 år ago

Solved

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

mer än 9 år ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

mer än 9 år ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

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

mer än 9 år ago