Create a function that produces counting up from 0 up to n then down to 0
n=2 --> 0 1 2 1 0
n=3 --> 0 1 2 3 2 1 0
a = 0;
z = 1;
n = 10
for b = 1:n;
if z <= n/2;
a = a+1
z = z+1;
elseif z == n;
z = 0;
a = a-1;
z = z+1;
Find relatively common elements in matrix rows
What is the next step in Conway's Life?
Get the area codes from a list of phone numbers
Given an unsigned integer x, find the largest y by rearranging the bits in x
Back to basics 2 - Function Path
Get ranks of values in a vector
Create an 'arrow-head" matrix
Two-output anonymous function?
Raise Matrix to Power
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office