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

1 view (last 30 days)
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.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 17 Aug 2016
Edited: Azzi Abdelmalek on 17 Aug 2016
A=cell(1,1000)
B=cellfun(@(x) randi(10,1,40),A,'un',0) % Example

More Answers (1)

Thorsten
Thorsten on 17 Aug 2016
You can use cell arrays. But why don't you want to use matrices?

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!