<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
Le 02/10/2012 19:33, <a class="moz-txt-link-abbreviated" href="mailto:samuel.enibe@unn.edu.ng">samuel.enibe@unn.edu.ng</a> a écrit :
<blockquote cite="mid:506b2556.42020e0a.227d.ffffe316@mx.google.com"
type="cite">
<pre wrap="">Dear sir,
Is there an existing function in SCILAB to remove all rows or columns with with one or more missing values from a matrix such as X.
I want to avoid the alternative of using the scipts such as
K = find(isnan(X))
And then converting the K to row,column format before deleting the rows or columns with missing values.
</pre>
</blockquote>
I am afraid that a set of instructions is required. One possibility is
the following<br>
(to delete <i>columns</i> with one or more %nan) :<br>
<br>
<tt><font color="#999999">m = rand(5,5);<br>
m(3,2) = %nan;<br>
m(2,4) = %nan<br>
</font><br>
m(:,or(isnan(m),<i>'r'</i>)) = []</tt><br>
<tt>// m(or(isnan(m),<i>'c'</i>),:) = [] // for rows<br>
</tt><br>
<br>
Regards<br>
Samuel<br>
<br>
<br>
</body>
</html>