MATLAB: Convert struct of cell in a matrix of cell matrixstruct Hi, there is a way to convert the struct of cell (attached) in a matrix of cell? thanks Best Answer Are you looking for{L1.l} %for row vector of cellsor something more complex? Related SolutionsMATLAB: Accessing cell array data every 2 columns and concatenating them Easy with cellfun:%generate random data:A=cell(3,6);x=[137 134 410 411 439 455];for r=1:size(A,1) for c=1:size(A,2) A{r,c}=num2cell(randi(10,1,x(c))); endend%the actual line of code:A=cellfun(@(x1,x2) [x1,x2],A(:,1:2:end),A(:,2:2:end),'UniformOutput',0); MATLAB: Find certain cells with keyword S = {'wte-142-9', 'wte-111-1', 'wte-142-1', 'wte-123-09', 'wte-142-6'};M = S(contains(S, '-142-')) % With modern Matlab versionsFor older systems:match = ~cellfun('isempty', strfind(S, '-142-'));M = S(match) Related QuestionHow do you import a .log file and put the information into various columns with headersHow to arrange data in cell arrayHow to count specific numbers in a matrixCell conversion to matCreate new column in cell array based on string values in other columnsHow to convert 66 x 2 cell array into matrix
Best Answer