MATLAB: How to delete field in struct in loop structstructures In have struct A having fields A1(2×1), A2(2×1), A3(12×1) ….A100(23×1). I want to delete fields whose size is (2×1). how to delete it Best Answer n1 = fieldnames(A);Aout = rmfield(A,n1(cellfun(@numel,struct2cell(A)) == 2)); Related SolutionsMATLAB: Struct array d = [Name;Temp];Data = struct(d{:}) MATLAB: Struct array out = [data.bidPrice]orout = cat(1,data.bidPrice)ets. Related QuestionSaving structsAlternate to repmat to create cell arrayStruct arrayArray of structures in matlabStructs in struct, howto access
Best Answer