From 2118dc2e7e2a24a40c581f6b397a847ab6f009c4 Mon Sep 17 00:00:00 2001
From: Georg Martin <martin@hcp-sense.com>
Date: Fri, 22 Sep 2023 16:06:40 +0200
Subject: [PATCH] added struct2array.m

fixes #58
---
 struct2array.m | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 struct2array.m

diff --git a/struct2array.m b/struct2array.m
new file mode 100644
index 0000000..3b5448a
--- /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{:}];
+
-- 
GitLab