Problem 56235. Intrication de deux vecteurs
Ecrire une fonction "intric" qui prend en entrée un vecteur ligne v1 et un vecteur ligne v2 et renvoie le vecteur ligne vres dont les élements alternent les elements de v1 et v2.
exemple:
>>vres=intrc([1 2 3], [4 5 6])
1 4 2 5 3 6
>>vres=intric([1 2 3 4], [4 5 6])
1 4 2 5 3 6 4
>>vres=intric([4 5 6], [1 2 3 4])
4 1 5 2 6 3 4
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6386 Solvers
-
3714 Solvers
-
find the maximum element of the matrix
515 Solvers
-
Create an index-powered vector
821 Solvers
-
Matrix multiplication across rows
350 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!