Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
then
B = [ 1 1 5 5 8 8 ]
Solution Stats
Problem Comments
8 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers10866
Suggested Problems
-
Sort a list of complex numbers based on far they are from the origin.
5820 Solvers
-
The Goldbach Conjecture, Part 2
2420 Solvers
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
2172 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
523 Solvers
-
convert matrix to single column
440 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Really found a lot of trouble to find the solution.
But could not find how someone could solve it just using a size of 7.
good one
What matlab functions are useful for this ? (I did it with a loop)
Good problem if you don't use repelem
I think the test should also check for column vectors and any vector with special variables Inf and NaN
Nice problem without using kron function
B = [ A A];
Is a valid answer! Your problem statement says nothing about the element in vector b being in order. Test 2 is correct for only one case.
Use repelem inbuilt function