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

2 次查看(过去 30 天)
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.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-17
编辑:Azzi Abdelmalek 2016-8-17
A=cell(1,1000)
B=cellfun(@(x) randi(10,1,40),A,'un',0) % Example

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by