help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

suppressing certain warnings


From: E. Joshua Rigler
Subject: suppressing certain warnings
Date: 22 Aug 2002 14:24:17 -0600

In the following loop...


 for j=1:n
   y(:,j) = [zeros(j-1,1); x(1:length(x)-j+1 )];
 endfor

(so, if j==1, zeros.m returns a nul matrix, and the first column of y
simply becomes x)


I get the following warning every time the loop goes through its first
iteration...

 warning: empty matrix found in matrix list

which is due to having a nul matrix as the first element in my matrix
list.    

1) Is there a way to suppress this warning, or only have it displayed
once?  2) Is there a better way to do what I want that doesn't
necessarily involve writing a conditional statement to check when j==1? 
It's just that this loop, and similar ones, are rather numerous
throughout all my different functions and scripts, and I don't want to
go back and fix them all.

Thanks,

EJR



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]