source: trunk/src/set_field_list.m @ 913

Last change on this file since 913 was 908, checked in by g7moreau, 10 years ago
  • Update Copyright to 2015
File size: 2.0 KB
Line 
1%'set_field_list': defines variables needed for the diff fields(velocity, vort, div...)
2%---------------------------------------------------------------------
3% [FieldList,VecColorList]=set_field_list(UName,VName,CName)
4%
5% OUTPUT:
6%  FieldList: list (cell column) of the fields to propose in the menu FieldName
7%  VecColorList: list (cell column) of the fields to propose in the menu for vector color
8%
9% INPUT:
10%  UName: name of the x vector component
11%  VName: name of the y vector component
12%  CName: name of an additional scalar for color
13%
14% RELATED FUNCTIONS:
15%  varname_generator.m: determines the field names to read in the netcdf
16%  file, depending on the scalar
17
18%=======================================================================
19% Copyright 2008-2015, 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
36function [FieldList,VecColorList]=set_field_list(UName,VName,CName)
37
38FieldList={['vec(' UName ',' VName ')'];...
39    ['norm(' UName ',' VName ')'];...
40    ['curl(' UName ',' VName ')'];...
41    ['div(' UName ',' VName ')'];...
42    ['strain(' UName ',' VName ')'];...
43    UName;...
44    VName};
45VecColorList={['norm(' UName ',' VName ')'];...
46    UName;...
47    VName};...
48if exist('CName','var') && ~isempty(CName)
49    VecColorList=[{CName};VecColorList];
50end
51
52
Note: See TracBrowser for help on using the repository browser.