Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Limiting vectors to a certain number of rows

1 visualización (últimos 30 días)
Giovanni
Giovanni el 12 de Dic. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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?

Respuestas (1)

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

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by