bug 4201 fix
Serge Steer [Thu, 12 Mar 2009 17:40:14 +0000 (18:40 +0100)]
scilab/modules/optimization/macros/datafit.sci

index eddbb64..2fbd999 100644 (file)
@@ -86,7 +86,11 @@ if nv>=1 then
   else
     W=varargin(1);varargin(1)=null()
     if size(W,1)~=size(W,2) then 
-      error(msprintf(gettext('%s: Weighting matrix must be square.'),'datafit'));
+      if size(W,1)==1 then
+        error(msprintf(gettext('%s: Initial guess must be a column vector.'),'datafit'));
+      else
+        error(msprintf(gettext('%s: Weighting matrix must be square.'),'datafit'));
+      end
     end
   end
 end