Hi, I want to transform the array A=[1 2 3 4 5] to this matrix A= [1 2; 2 3; 3 4; 4 5] Is it possible? Thank you very much

 采纳的回答

James Tursa
James Tursa 2018-3-5

0 个投票

Hint: Look at combining the results of A(1:end-1) and A(2:end) into your resulting matrix.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by