From 52780e449df15747b1339b1fa2c8caf8d69b2c56 Mon Sep 17 00:00:00 2001 From: imushir Date: Mon, 28 Dec 2015 17:01:05 +0530 Subject: added support for uint8 uin16 int8 int16 --- macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci (limited to 'macros/FunctionAnnotation') diff --git a/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci new file mode 100644 index 0000000..5ab0c64 --- /dev/null +++ b/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci @@ -0,0 +1,23 @@ +function outsize = FA_SZ_ROW_COLUMN_CAT(inval,in1size,in2size) + + +//Check the input arguments +SCI2CNInArgCheck(argn(2),3,3); +in1size = string(in1size); +in2size = string(in2size); +inval = string(inval); +if(inval == '1') then + in1num_r = eval(in1size); + in2num_r = eval(in2size); + outsize(1) = string(in1num_r + in2num_r); + outsize(2) = string(in2num_r); +elseif(inval == '2') then + in1num_c = eval(in1size); + in2num_c = eval(in2size) + outsize(1) = string(in1num_c); + outsize(2) = string(in1num_c + in2num_c); +else + error(36, "Wrong input argument '+inval+'. Use 1 or 2 as first argument in cat command."); +end + +endfunction -- cgit