MATLAB: On Cell Array cell array need help with the following question. Write an expression that would display a random element from a cell array (without assuming that the number of elements in the cell array is known). Best Answer C - your cell array n - number of elements in the your cell arrayout = C(randi(n))orout = C{randperm(n,1)} Related SolutionsMATLAB: How to convert a 3x3xN matrix to a N element cell array % a is your 3*3*N arrayc = mat2cell(a,3,3,ones(1,N));c = c(:); MATLAB: Indexing cell array of arrays cellfun(@(x)x(1:K),C,'uni',0) %Where C is your original cell array Related QuestionRandom selection of a cellHow to convert matrix in cell array to same size cell array within the original array without for loopHow to create a random row matrix with some fixed positionsHow to generate random purmutation of string matrixCheck condition if array A contain array B or not
Best Answer