Mercurial > hg > octave-nkf
comparison scripts/polynomial/ppder.m @ 11472:1740012184f9
Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 21:33:04 -0800 |
parents | be55736a0783 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11471:994e2a93a8e2 | 11472:1740012184f9 |
---|---|
15 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
16 ## along with this software; see the file COPYING. If not, see | 16 ## along with this software; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {ppd =} ppder (pp) | 20 ## @deftypefn {Function File} {@var{ppd} =} ppder (@var{pp}) |
21 ## Computes the piecewise derivative of a piecewise polynomial struct @var{pp}. | 21 ## Computes the piecewise derivative of a piecewise polynomial struct @var{pp}. |
22 ## @seealso{mkpp,ppval} | 22 ## @seealso{mkpp,ppval} |
23 ## @end deftypefn | 23 ## @end deftypefn |
24 | 24 |
25 function ppd = ppder (pp) | 25 function ppd = ppder (pp) |
26 if (nargin != 1) | 26 if (nargin != 1) |
27 print_usage (); | 27 print_usage (); |
28 endif | 28 endif |
29 if (! isstruct (pp)) | 29 if (! isstruct (pp)) |
30 error ("ppder: expects a pp structure"); | 30 error ("ppder: PP must be a structure"); |
31 endif | 31 endif |
32 | 32 |
33 [x, p, n, k, d] = unmkpp (pp); | 33 [x, p, n, k, d] = unmkpp (pp); |
34 p = reshape (p, [], k); | 34 p = reshape (p, [], k); |
35 if (k <= 1) | 35 if (k <= 1) |