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