summaryrefslogtreecommitdiff
path: root/macros/postpad.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/postpad.sci')
-rw-r--r--macros/postpad.sci22
1 files changed, 11 insertions, 11 deletions
diff --git a/macros/postpad.sci b/macros/postpad.sci
index 3797e08..f10ea85 100644
--- a/macros/postpad.sci
+++ b/macros/postpad.sci
@@ -9,18 +9,18 @@
// Last Modified on : 3 Feb 2024
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
-/*
-Calling Sequence :
- postpad (x, l)
- postpad (x, l, c)
- postpad (x, l, c, dim)
-Append the scalar value c to the vector x until it is of length l. If c is not given, a value of 0 is used.
-If length (x) > l, elements from the end of x are removed until a vector of length l is obtained.
-If x is a matrix, elements are appended or removed from each row.
-If the optional argument dim is given, operate along this dimension.
-If dim is larger than the dimensions of x, the result will have dim dimensions.
-*/
+
function res = postpad(x,l,c,dim)
+// Calling Sequence :
+// postpad (x, l)
+// postpad (x, l, c)
+// postpad (x, l, c, dim)
+// Append the scalar value c to the vector x until it is of length l. If c is not given, a value of 0 is used.
+// If length (x) > l, elements from the end of x are removed until a vector of length l is obtained.
+// If x is a matrix, elements are appended or removed from each row.
+// If the optional argument dim is given, operate along this dimension.
+// If dim is larger than the dimensions of x, the result will have dim dimensions.
+
if nargin < 2 then
error("Usage : postpad(x,l,c(optional),dim(optional))")
end