MATLAB: How to create n arrays of size 100 each with random integer values #arrays #randomintegers c = cell(1,100) for i = 1:100 c{i} = randi(100) end I tried doing this but it only gives 100 arrays of size 1. I need 1-D arrays Any other solution is gladly welcomed. Thank you! Best Answer c = cell(1,100)for i = 1:100 c{i} = randi(100,1,100)end Related SolutionsMATLAB: How to remove first 19 rows from a multidimensional cell array Use a cellfun.% SetupA(1)={rand(100,10)};A(2)={rand(100,11)};A(3)={rand(100,10)};A(4)={rand(100,15)};% Remove first 20 rowsB = cellfun(@(x) x(21:end,:),A,'UniformOutput',false) MATLAB: How to filter data of a cell based on a column value I think the code will be like this:% 100x100 sample cell arrayC = num2cell(randi(10,100,100));% Rows where the 9th column is equal to 3idx = cellfun(@(x) isequal(x,3), C(:,9));% Extract the target rowsC1 = C(idx,:);% OthersC2 = C(~idx,:); Related QuestionRemove elements of a cell array if length<200Multi level cell multiplicationHow to reshape a cell array of cell arrays
Best Answer