1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of nc2struct</title> |
---|
6 | <meta name="keywords" content="nc2struct"> |
---|
7 | <meta name="description" content="'nc2struct': transform a netcdf file in a corresponding matlab structure"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">.</a> > nc2struct.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>nc2struct |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>'nc2struct': transform a netcdf file in a corresponding matlab structure</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function [Data,var_detect,ichoice]=nc2struct(nc,varargin) </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">'nc2struct': transform a netcdf file in a corresponding matlab structure |
---|
31 | it reads all the global attributes and all variables, or a selected list. |
---|
32 | The corresponding dimensions and variable attributes are then extracted |
---|
33 | %%%%% TODO: add the possibility to read only attributes, see nc2struct_toolbox %%% |
---|
34 | ---------------------------------------------------------------------- |
---|
35 | function [Data,var_detect,ichoice]=nc2struct(nc,ListVarName) |
---|
36 | |
---|
37 | OUTPUT: |
---|
38 | Data: structure containing all the information of the netcdf file (or netcdf object) |
---|
39 | with fields: |
---|
40 | .ListGlobalAttribute: cell listing the names of the global attributes |
---|
41 | .Att_1,Att_2... : values of the global attributes |
---|
42 | .ListDimName: cell listing the names of the array dimensions |
---|
43 | .DimValue: array dimension values (Matlab vector with the same length as .ListDimName |
---|
44 | .ListVarName: cell listing the names of the variables |
---|
45 | .VarDimIndex: cell containing the set of dimension indices (in list .ListDimName) for each variable of .ListVarName |
---|
46 | .VarDimName: cell containing a cell of dimension names (in list .ListDimName) for each variable of .ListVarName |
---|
47 | .VarAttribute: cell of structures s containing names and values of variable attributes (s.name=value) for each variable of .ListVarName |
---|
48 | .Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName |
---|
49 | var_detect: vector with same length as ListVarName, with 1 for each detected variable and 0 else. |
---|
50 | ichoice: = line |
---|
51 | |
---|
52 | INPUT: |
---|
53 | nc: name of a netcdf file (char string) or netcdf object |
---|
54 | ListVarName: optional list of variable names to select (cell array of char strings {'VarName1', 'VarName2',...} ) |
---|
55 | if ListVarName=[] or {}, no variables is read (only global attributes and lists of dimensions, variables and attriburtes) |
---|
56 | if ListVarName is absent, or = '*', ALL the variables are read. |
---|
57 | if ListVarName is a cell array with n lines, the set of variables |
---|
58 | will be sought by order of priority in the list, while output names will be set by the first line |
---|
59 | |
---|
60 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
---|
61 | Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, sommeria@coriolis-legi.org. |
---|
62 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
---|
63 | This file is part of the toolbox UVMAT. |
---|
64 | |
---|
65 | UVMAT is free software; you can redistribute it and/or modify |
---|
66 | it under the terms of the GNU General Public License as published by |
---|
67 | the Free Software Foundation; either version 2 of the License, or |
---|
68 | (at your option) any later version. |
---|
69 | |
---|
70 | UVMAT is distributed in the hope that it will be useful, |
---|
71 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
72 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
73 | GNU General Public License (file UVMAT/COPYING.txt) for more details. |
---|
74 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</pre></div> |
---|
75 | |
---|
76 | <!-- crossreference --> |
---|
77 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
78 | This function calls: |
---|
79 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
80 | <li><a href="nc2struct_toolbox.html" class="code" title="function [Data,var_detect,ichoice]=nc2struct_toolbox(nc,varargin)">nc2struct_toolbox</a> 'nc2struct_toolbox': transform a netcdf file in a corresponding matlab structure, USE OLD NETCDF LIBRARY</li></ul> |
---|
81 | This function is called by: |
---|
82 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
83 | <li><a href="civ.html" class="code" title="function varargout = civ(varargin)">civ</a> 'civ': function associated with the interface 'civ.fig' for PIV, spline interpolation and stereo PIV (patch)</li><li><a href="civ_3D.html" class="code" title="function varargout = civ_3D(varargin)">civ_3D</a> 'civ_3D': function associated with the interface 'civ_3D.fig' for PIV in volume</li><li><a href="get_field.html" class="code" title="function varargout = get_field(varargin)">get_field</a> 'get_field': display variables and attributes from a Netcdf file, and RUN selected fields</li><li><a href="read_civxdata.html" class="code" title="function [Field,VelTypeOut]=read_civxdata(filename,FieldNames,VelType)">read_civxdata</a> 'read_civxdata': reads civx data from netcdf files</li><li><a href="read_get_field.html" class="code" title="function [SubField,errormsg]=read_get_field(hget_field)">read_get_field</a> 'read_get_field': read the list of selected variables from the GUI get_field</li><li><a href="series.html" class="code" title="function varargout = series(varargin)">series</a> 'series': master function associated to the GUI series.m for analysis field series</li><li><a href="uvmat.html" class="code" title="function varargout = uvmat(varargin)">uvmat</a> 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization</li></ul> |
---|
84 | <!-- crossreference --> |
---|
85 | |
---|
86 | |
---|
87 | |
---|
88 | <hr><address>Generated on Wed 10-Mar-2010 20:42:36 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
89 | </body> |
---|
90 | </html> |
---|