1 | %'sub_field': combines two input fields, taking the difference if of the same nature
|
---|
2 | %
|
---|
3 | % the two fields are subtracted when of the same nature (scalar or
|
---|
4 | % vector),and defined at the same points
|
---|
5 | %
|
---|
6 | % when scalar and vectors are combined, the fields are just merged in a single matlab structure for common visualisation
|
---|
7 | %-----------------------------------------------------------------------
|
---|
8 | % function SubData=sub_field(Field,XmlData,Field_1)
|
---|
9 | %
|
---|
10 | % OUPUT:
|
---|
11 | % SubData: structure representing the resulting field
|
---|
12 | %
|
---|
13 | % INPUT:
|
---|
14 | % Field: matlab structure representing the first field
|
---|
15 | % Field_1:matlab structure representing the second field
|
---|
16 |
|
---|
17 | %=======================================================================
|
---|
18 | % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
|
---|
19 | % http://www.legi.grenoble-inp.fr
|
---|
20 | % Joel.Sommeria - Joel.Sommeria (A) univ-grenoble-alpes.fr
|
---|
21 | %
|
---|
22 | % This file is part of the toolbox UVMAT.
|
---|
23 | %
|
---|
24 | % UVMAT is free software; you can redistribute it and/or modify
|
---|
25 | % it under the terms of the GNU General Public License as published
|
---|
26 | % by the Free Software Foundation; either version 2 of the license,
|
---|
27 | % or (at your option) any later version.
|
---|
28 | %
|
---|
29 | % UVMAT is distributed in the hope that it will be useful,
|
---|
30 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
31 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
32 | % GNU General Public License (see LICENSE.txt) for more details.
|
---|
33 | %=======================================================================
|
---|
34 |
|
---|
35 | function SubData=sub_field(Field,XmlData,Field_1)
|
---|
36 | if exist('Field_1','var')
|
---|
37 | SubData=sub_field(Field,XmlData,Field_1);
|
---|
38 | else
|
---|
39 | SubData=[];
|
---|
40 | end
|
---|