annotate inst/Constant.m @ 270:f4d6ae912a08 default tip

Correct typos in the doc-strings
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Thu, 14 Aug 2014 17:55:32 +0200
parents b40f22aad4af
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
1dbe146bff03 Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents: 148
diff changeset
1 ## Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net>
148
f2193e825ad7 Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents: 139
diff changeset
2 ##
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
3 ## This program is free software; you can redistribute it and/or modify it under
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
4 ## the terms of the GNU General Public License as published by the Free Software
152
1dbe146bff03 Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents: 148
diff changeset
5 ## Foundation; either version 3 of the License, or (at your option) any later
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
6 ## version.
148
f2193e825ad7 Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents: 139
diff changeset
7 ##
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
8 ## This program is distributed in the hope that it will be useful, but WITHOUT
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
11 ## details.
148
f2193e825ad7 Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents: 139
diff changeset
12 ##
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
13 ## You should have received a copy of the GNU General Public License along with
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
14 ## this program; if not, see <http://www.gnu.org/licenses/>.
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
15
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
16 ## -*- texinfo -*-
182
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
17 ## @deftypefn {Function File} {[@var{c}]} = Constant (@var{name}, @var{value})
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
18 ##
270
f4d6ae912a08 Correct typos in the doc-strings
Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
parents: 182
diff changeset
19 ## Creates a constant object over all the mesh elements with the value
182
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
20 ## specified.
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
21 ##
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
22 ## This function take as input the @var{name} of the Constant that has
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
23 ## to be created and its @var{value}, which can be either a scalar or a vector.
b40f22aad4af Improve the documentation for the pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 152
diff changeset
24 ##
133
f028ad846c12 Update texinfo message
gedeone-octave <marcovass89@hotmail.it>
parents: 132
diff changeset
25 ## @seealso{Expression, Function}
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
26 ## @end deftypefn
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
27
138
0de65c450b08 Fix bug
gedeone-octave <marcovass89@hotmail.it>
parents: 133
diff changeset
28 function c = Constant (name, xx)
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
29
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
30 if nargin != 2
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
31 error ("Constant: wrong number of input parameters.");
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
32 elseif ! ischar (name)
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
33 error ("Constant: second argument is not a valid string");
139
a02811631f71 Fix another little bug
gedeone-octave <marcovass89@hotmail.it>
parents: 138
diff changeset
34 elseif ! isvector (xx)
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
35 error ("Constant: second argument is not a valid string");
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
36 endif
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
37
138
0de65c450b08 Fix bug
gedeone-octave <marcovass89@hotmail.it>
parents: 133
diff changeset
38 c = Expression (name, @(x, y, z) xx);
132
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
39
1b63e9f76624 New function for the definition of a Constant expression.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff changeset
40 endfunction