diff --git a/struct2array.m b/struct2array.m new file mode 100644 index 0000000000000000000000000000000000000000..3b5448ab151870e7f4009bcbf7b5f5064466fca1 --- /dev/null +++ b/struct2array.m @@ -0,0 +1,14 @@ +function a = struct2array(s) +%STRUCT2ARRAY Convert structure with doubles to an array. + +% Author(s): R. Losada +% Copyright 1988-2013 The MathWorks, Inc. + +narginchk(1,1); + +% Convert structure to cell +c = struct2cell(s); + +% Construct an array +a = [c{:}]; +