Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
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.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 17 Août 2016
Modifié(e) : Azzi Abdelmalek le 17 Août 2016
A=cell(1,1000)
B=cellfun(@(x) randi(10,1,40),A,'un',0) % Example

Plus de réponses (1)

Thorsten
Thorsten le 17 Août 2016
You can use cell arrays. But why don't you want to use matrices?

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by