diff options
Diffstat (limited to 'macros/ToolInitialization/doublecomplex.sci')
-rw-r--r-- | macros/ToolInitialization/doublecomplex.sci | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/macros/ToolInitialization/doublecomplex.sci b/macros/ToolInitialization/doublecomplex.sci index 8b36bf6..5fd3784 100644 --- a/macros/ToolInitialization/doublecomplex.sci +++ b/macros/ToolInitialization/doublecomplex.sci @@ -21,6 +21,9 @@ function y = doublecomplex(x) // ------------------------------
SCI2CNInArgCheck(argn(2),1,1);
-y = x+0*%i;
+if(x==0)
+y = 0*%i;
+else
+y=x+0*%i;
-endfunction
\ No newline at end of file +endfunction
|