Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Limiting vectors to a certain number of rows

1 visualizzazione (ultimi 30 giorni)
Giovanni
Giovanni il 12 Dic 2013
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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?

Risposte (1)

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

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by