MATLAB Answers

Create a matrix with a repetitive pattern

40 views (last 30 days)
AA
AA on 5 Apr 2018
Answered: James Tursa on 5 Apr 2018
Hi,
consider the following matrix.
234
235
236
237
238
239
I want to convert it into the following matrix pattern:
234
235
236
237
238
239
234
235
236
237
238
239
234
235
236
237
238
239
234
235
236
237
238
239
234
235
236
237
238
239
234
235
236
237
238
239

  0 Comments

Sign in to comment.

Accepted Answer

James Tursa
James Tursa on 5 Apr 2018
x = your original vector
n = number of vertical repititions
result = repmat(x,n,1);

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by