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

14 years ago

Solved


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

14 years ago

Solved


Return a list sorted by number of occurrences
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 ...

14 years ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

14 years ago

Solved


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

14 years ago

Solved


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

14 years ago

Solved


Remove any row in which a NaN appears
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...

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

14 years ago

Solved


Back and Forth Rows
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...

14 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

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

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

14 years ago

Solved


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

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

14 years ago

Solved


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

14 years ago

Solved


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

14 years ago

Published


Publishing called functions
Jiro's pick this week is "Publish dependent and called functions" by Nick Angelini. Publishing is one of the...

14 years ago

Thumbnail

Published


Drag Objects Conveniently
Brett's Pick this week is Draggable, by Francois Bouffard. For a pet project of mine, I needed to...

14 years ago

Thumbnail

Published


Watch HDTV in MATLAB
Idin's Pick this week is ATSC: From RF to Video, by Dick Benson. Watch HDTV in MATLAB? Well, not quite. ...

14 years ago

Thumbnail

Published


Automatically add copyright information to your MATLAB files
Jiro's pick this week is addcopyright by Mirko Hrovat. As a customer-facing engineer at MathWorks, I...

14 years ago

Thumbnail

Published


Get Information About Your Computer
Brett's Pick this week is CPU Info by Ben Tordoff. Today's is a quick-Pick, to go with our holiday...

14 years ago

Thumbnail

Published


Simulink for Natural Interaction Device
Doug's pick this week is Simulink for Natural Interaction Device by Takashi Chikamasa. Although I work at a software...

14 years ago

Thumbnail

Published


A Vivid Colormap
Jiro's pick this week is Vivid Colormap by Joseph Kirk. Good uses of colors can help convey ideas effectively. It can...

14 years ago

Thumbnail

Published


Will my flow be turbulent?
Brett's Pick this week is Moody, by Tom Davis. I am not a mechanical engineer, though I did study fluid...

14 years ago

Thumbnail

Published


Scrolling Figures & GUIs
Ameya's pick this week is Scrollsubplot by Bjorn Gustavsson. This week, it's an early post because of...

14 years ago

Thumbnail

Published


Errorbar with Adjusted Tick Size
Jiro's pick this week is Errorbar with Adjusted Tick by Arnaud Laurent. Just this week, I got a comment from...

14 years ago

Thumbnail

Published


3D Polar Plotting
Brett's Pick this week is polarplot3d, by Ken Garrard. I don't often get suggestions from readers of this...

14 years ago

Thumbnail

Published


Happy (belated) Halloween!
Michael's pick this week is Batman Equation: The Legend by Mingjing Zhang. This posting comes a bit too late...

14 years ago

Thumbnail

Published


Numerical methods on piecewise-continuous functions
Jiro's pick this week is Chebfun v2 by the Chebfun Team. Contents ......

14 years ago

Thumbnail

Published


Drawing Ellipses
Brett's Pick this week is ellipse, by David Long. I've blogged before about fitting circles, and about...

14 years ago

Thumbnail

Load more