changeset 9533:9e0034f84724 octave-forge

signal, mechanics, geometry: using polyder instead of polyderiv, following warning in 3.6.1
author jpicarbajal
date Tue, 28 Feb 2012 15:02:17 +0000
parents d88548d176f2
children 4fc9a1f5372c
files main/geometry/inst/shape2d/shapearea.m main/geometry/inst/shape2d/shapecentroid.m main/mechanics/inst/core/inertiamoment.m main/mechanics/inst/core/masscenter.m main/mechanics/inst/core/private/shapemoment.m main/signal/inst/private/h1_z_deriv.m
diffstat 6 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/main/geometry/inst/shape2d/shapearea.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/geometry/inst/shape2d/shapearea.m	Tue Feb 28 15:02:17 2012 +0000
@@ -40,7 +40,7 @@
     px = x(1,:);
     py = x(2,:);
 
-    P = polyint (conv (px, polyderiv(py)));
+    P = polyint (conv (px, polyder(py)));
 
     dA = diff(polyval(P,[0 1]));
 
--- a/main/geometry/inst/shape2d/shapecentroid.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/geometry/inst/shape2d/shapecentroid.m	Tue Feb 28 15:02:17 2012 +0000
@@ -37,8 +37,8 @@
 
     px = x(1,:);
     py = x(2,:);
-    Px = polyint (conv(conv (px , px)/2 , polyderiv (py)));
-    Py = polyint (conv(-conv (py , py)/2 , polyderiv (px)));
+    Px = polyint (conv(conv (px , px)/2 , polyder (py)));
+    Py = polyint (conv(-conv (py , py)/2 , polyder (px)));
 
     dcm = zeros (1,2);
     dcm(1) = diff(polyval(Px,[0 1]));
--- a/main/mechanics/inst/core/inertiamoment.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/mechanics/inst/core/inertiamoment.m	Tue Feb 28 15:02:17 2012 +0000
@@ -41,7 +41,7 @@
     py = x(2,:);
 
     paux = conv (px, px)/3 + conv(py, py);
-    paux2 = conv (px, polyderiv (py)) ;
+    paux2 = conv (px, polyder (py)) ;
     P = polyint (conv (paux, paux2));
 
     %% Faster than quad
--- a/main/mechanics/inst/core/masscenter.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/mechanics/inst/core/masscenter.m	Tue Feb 28 15:02:17 2012 +0000
@@ -36,8 +36,8 @@
 
     px = x(1,:);
     py = x(2,:);
-    Px = polyint (conv(conv (px , px)/2 , polyderiv (py)));
-    Py = polyint (conv(-conv (py , py)/2 , polyderiv (px)));
+    Px = polyint (conv(conv (px , px)/2 , polyder (py)));
+    Py = polyint (conv(-conv (py , py)/2 , polyder (px)));
 
     dcm = zeros (1,2);
     dcm(1) = diff(polyval(Px,[0 1]));
--- a/main/mechanics/inst/core/private/shapemoment.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/mechanics/inst/core/private/shapemoment.m	Tue Feb 28 15:02:17 2012 +0000
@@ -1,5 +1,5 @@
 %% Copyright (c) 2011 Juan Pablo Carbajal <carbajal@ifi.uzh.ch>
-%% 
+%%
 %%    This program is free software: you can redistribute it and/or modify
 %%    it under the terms of the GNU General Public License as published by
 %%    the Free Software Foundation, either version 3 of the License, or
@@ -16,7 +16,7 @@
 %% -*- texinfo -*-
 %% @deftypefn {Function File} @var{J} = shapemoment(@var{polycurve})
 %% @deftypefnx{Function File} @var{J} = shapemoment(@dots{}, @var{matrix})
-%% Calculates the second moment of area of a 2D shape. 
+%% Calculates the second moment of area of a 2D shape.
 %%
 %% The polygon is described in @var{p}, where each row is a different vertex as seen
 %% from the center of mass of the shape (see @code{center_mass_shape2d}).
@@ -35,7 +35,7 @@
 function J = shapemoment(shape, matrix=false)
 
   J = zeros (3,1);
-  
+
   if isnumeric (shape)
 
     [N dim] = size (shape);
@@ -44,7 +44,7 @@
     px_nxt = shape(nxt,1);
     py = shape(:,2);
     py_nxt = shape(nxt,2);
-    
+
     cr_prod = px.*py_nxt - px_nxt.*py;
 
     J = zeros (3, 1);
@@ -71,15 +71,15 @@
       py = x(2,:);
 
       paux = conv (py, py)/3;
-      paux2 = conv (py, polyderiv (px)) ;
+      paux2 = conv (py, polyder (px)) ;
       Px = -polyint ( conv (paux, paux2) );
 
       paux = conv (px, px)/3;
-      paux2 = conv (px, polyderiv (py)) ;
+      paux2 = conv (px, polyder (py)) ;
       Py = polyint ( conv (paux, paux2));
 
       paux = conv (px, px)/2;
-      paux2 = conv (py, polyderiv (py)) ;
+      paux2 = conv (py, polyder (py)) ;
       Pxy = polyint ( conv (paux, paux2));
 
       dJ = zeros(1,3);
--- a/main/signal/inst/private/h1_z_deriv.m	Tue Feb 28 14:11:38 2012 +0000
+++ b/main/signal/inst/private/h1_z_deriv.m	Tue Feb 28 15:02:17 2012 +0000
@@ -1,16 +1,16 @@
 ## Copyright 2007 R.G.H. Eschauzier <reschauzier@yahoo.com>
 ## Adapted by Carnë Draug on 2011 <carandraug+dev@gmail.com>
-## 
+##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 ## the Free Software Foundation; either version 2 of the License, or
 ## (at your option) any later version.
-## 
+##
 ## This program is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU General Public License
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
@@ -27,7 +27,7 @@
   d = (-1)^n; % Vector with the derivatives of H1(z)
   for i= (1:n-1)
     d  = [d 0];                           % Shift result right (multiply by -z)
-    d += prepad(polyderiv(d), i+1, 0, 2); % Add the derivative
+    d += prepad(polyder(d), i+1, 0, 2); % Add the derivative
   endfor
 
   %% Build output vector