필터 지우기
필터 지우기

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