Borrar filtros
Borrar filtros

Generate a set of 1000 elements where each element is a set of 40 elements

2 visualizaciones (últimos 30 días)
I want to Generate a Set of 1000 elements where each element is also a set of 40 elements. Apart from employing matrices, is there any other way.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 17 de Ag. de 2016
Editada: Azzi Abdelmalek el 17 de Ag. de 2016
A=cell(1,1000)
B=cellfun(@(x) randi(10,1,40),A,'un',0) % Example

Más respuestas (1)

Thorsten
Thorsten el 17 de Ag. de 2016
You can use cell arrays. But why don't you want to use matrices?

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by