summaryrefslogtreecommitdiff
path: root/CSXCAD/matlab/InitCSX.m
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-09-02 01:07:06 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-09-02 01:07:06 +0200
commit4950c433f10aa481691c64d95b962791d724a42a (patch)
treea94f6c3afa00ab2655a702344ff00586104dc959 /CSXCAD/matlab/InitCSX.m
Import openems_0.0.35+dfsg.1.orig.tar.bz2
[dgit import orig openems_0.0.35+dfsg.1.orig.tar.bz2]
Diffstat (limited to 'CSXCAD/matlab/InitCSX.m')
-rw-r--r--CSXCAD/matlab/InitCSX.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/CSXCAD/matlab/InitCSX.m b/CSXCAD/matlab/InitCSX.m
new file mode 100644
index 0000000..2411d85
--- /dev/null
+++ b/CSXCAD/matlab/InitCSX.m
@@ -0,0 +1,31 @@
+function CSX = InitCSX(varargin)
+% function CSX = InitCSX()
+%
+% Inititalize the CSX data-structure.
+%
+% variable arguments:
+% 'CoordSystem' : define the default coordinate system
+% 0 -> Cartesian
+% 1 -> Cylindircal
+% 2 -> Sphercial (not yet implemented)
+%
+% example:
+% CSX = InitCSX(); %for a default cartesian mesh
+% or
+% CSX = InitCSX('CoordSystem','1'); % for a cylindrical mesh definition
+%
+% See also DefineRectGrid, SmoothMeshLines, SmoothMeshLines2,
+% SetBackgroundMaterial
+%
+% CSXCAD matlab interface
+% -----------------------
+% author: Thorsten Liebig
+
+CSX.Properties = [];
+
+%Cartesian mesh as default coordinate system
+CSX.ATTRIBUTE.CoordSystem = 0;
+
+for n=1:2:numel(varargin)
+ CSX.ATTRIBUTE.(varargin{n}) = (varargin{n+1});
+end