フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Limiting vectors to a certain number of rows

1 回表示 (過去 30 日間)
Giovanni
Giovanni 2013 年 12 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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