MATLAB: Array of structures in matlab array of structuresarray of structures in matlab how to implement array of structures in matlab.structure containing two fields. Best Answer array1=1:10array2=21:30out=struct('field1', num2cell(array1),'field2',num2cell(array2)) Related SolutionsMATLAB: Array of structures containing arrays s(1) = struct('field1', [1:3;4:6]);s(2) = struct('field1', [4:6;1:3]);z = cell2mat(struct2cell(s))out = squeeze(z(1,3,:))' MATLAB: How to conbine the array inside the structure struct1=struct('f1',num2cell(1:10))struct2=struct('f2',num2cell(1:5))new_struct=struct('new_f',num2cell([struct1.f1 struct2.f2 ])) Related QuestionHow to extract the structure array from a cell arrayStructureHow to delete field in struct in loopCell Array to StructuresArray of structures in matlabIndexing structured arrays
Best Answer