Generate a vector like 1,2,2,3,3,3,4,4,4,4
So if n = 3, then return
[1 2 2 3 3 3]
And if n = 5, then return
[1 2 2 3 3 3 4 4 4 4 5 5 5 5 5]
Project Euler: Problem 7, Nth prime
Number of Circles in a Number
Return unique values without sorting
Permute diagonal and antidiagonal
Reverse a matrix
Find the maximum two numbers of every column of a matrix
Determine if input is a perfect number
Find the regional maximum value
Return fibonacci sequence do not use loop and condition version 2
If the number is Narcissistic number
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
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