Info

此问题已关闭。 请重新打开它进行编辑或回答。

Limiting vectors to a certain number of rows

1 次查看(过去 30 天)
Hi, i have created a function that creates n lots of a matrix of 3 columns but different number of rows. How do i limit the number of rows of this matrixes to say 4 for each one?

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2013-12-12
n = 7;
out = arrayfun(@(x)rand(randi(4),3),1:n,'un',0);

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by