how to repeat specific rows?

2 次查看(过去 30 天)
andrew
andrew 2014-3-4
I have a cell array and would like to repeat certain rows. how do I do this?

回答(1 个)

Jos (10584)
Jos (10584) 2014-3-4
Something like this?
C = {'hello' ; rand(2,3) ; 1:5, 6}
ix = [1 1 2 3 3 3 4]
C = C(ix)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by