summaryrefslogtreecommitdiff
path: root/macros/detrend1.sci
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-11-28 14:53:58 +0530
committerAbhinav Dronamraju2017-11-28 14:53:58 +0530
commit9539b5efb5ccf665a1cc4b8e814e96460b22e0ab (patch)
treef659525925295350ca3f1388bdab13757e413185 /macros/detrend1.sci
parent7e43ae8d200a7da15ad458f5bb83582d0e389ce7 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-9539b5efb5ccf665a1cc4b8e814e96460b22e0ab.tar.gz
FOSSEE-Signal-Processing-Toolbox-9539b5efb5ccf665a1cc4b8e814e96460b22e0ab.tar.bz2
FOSSEE-Signal-Processing-Toolbox-9539b5efb5ccf665a1cc4b8e814e96460b22e0ab.zip
New functions and help files generated
Diffstat (limited to 'macros/detrend1.sci')
-rw-r--r--macros/detrend1.sci11
1 files changed, 11 insertions, 0 deletions
diff --git a/macros/detrend1.sci b/macros/detrend1.sci
index b9929f4..52ac26f 100644
--- a/macros/detrend1.sci
+++ b/macros/detrend1.sci
@@ -1,4 +1,15 @@
function y = detrend1(x, varargin)
+//This function removes the best fit of a polynomial of order P from the data X
+//Calling Sequence
+//detrend1(X,P)
+//Parameters
+//X: Input vecor or matrix.
+//P: The order of polnomial
+//Description
+//If X is a vector, 'detrend1(X, P)' removes the best fit of apolynomial of order P from the data X.If X is a matrix, 'detrend1(X, P)' does the same for each column in X.
+//
+//The second argument P is optional. If it is not specified, a value of 1 is assumed. This corresponds to removing a linear trend.
+//The order of the polynomial can also be given as a string, in which case P must be either "constant" (corresponds to 'P=0') or "linear"(corresponds to 'P=1')
rhs= argn(2);
if(rhs<1 | rhs> 2)
error("Wrong number of input arguments");