changeset 12906:d7a91b3fb7f9

Return empty matrix if the argument to orth is empty (bug #33301)
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Tue, 02 Aug 2011 11:40:27 -0500
parents f7a8d1dafda3
children 6e1b9f079e0f
files scripts/linear-algebra/orth.m
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/linear-algebra/orth.m
+++ b/scripts/linear-algebra/orth.m
@@ -39,6 +39,11 @@
 
   if (nargin == 1 || nargin == 2)
 
+    if (isempty (A))
+      retval = [];
+      return;
+    endif
+
     [U, S, V] = svd (A);
 
     [rows, cols] = size (A);