Statistics
RANK
908
of 295.448
REPUTATION
82
CONTRIBUTIONS
1 Question
23 Answers
ANSWER ACCEPTANCE
100.0%
VOTES RECEIVED
18
RANK
117 of 20.227
REPUTATION
9.754
AVERAGE RATING
4.50
CONTRIBUTIONS
17 Files
DOWNLOADS
148
ALL TIME DOWNLOADS
93477
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
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 ...
meer dan 12 jaar 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 + ...
bijna 13 jaar 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...
bijna 13 jaar 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...
bijna 13 jaar 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...
bijna 13 jaar 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...
bijna 13 jaar 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...
bijna 13 jaar 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...
bijna 13 jaar ago
Solved
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
bijna 13 jaar 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...
bijna 13 jaar ago