summaryrefslogtreecommitdiff
path: root/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci
diff options
context:
space:
mode:
authorSiddhesh Wani2015-05-25 14:46:31 +0530
committerSiddhesh Wani2015-05-25 14:46:31 +0530
commit6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26 (patch)
tree1b7bd89fdcfd01715713d8a15db471dc75a96bbf /2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci
downloadScilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.tar.gz
Scilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.tar.bz2
Scilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.zip
Original Version
Diffstat (limited to '2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci')
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci40
1 files changed, 40 insertions, 0 deletions
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci
new file mode 100644
index 00000000..50527771
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci
@@ -0,0 +1,40 @@
+function opoutsize = FA_SZ_OPCC(in1size,in2size)
+// function opoutsize = FA_SZ_OPCC(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPCC operator.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+in1size = string(in1size);
+in2size = string(in2size);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+if (isnum(in1size(1)) & isnum(in2size(1)))
+ in1num = eval(in1size(1));
+ in2num = eval(in2size(1));
+ opoutsize(1) = string(in1num+in2num);
+else
+ opoutsize(1) = '('+string(in1size(1))+'+'+string(in2size(1))+')';
+end
+
+opoutsize(2) = in1size(2);
+
+endfunction