<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174003</link>
    <title>MATLAB Central Newsreader - Remove NaN data</title>
    <description>Feed for thread: Remove NaN data</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 08 Aug 2008 13:05:04 -0400</pubDate>
      <title>Remove NaN data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174003#448121</link>
      <author>RT Trevino</author>
      <description>Hey all, I have data from excel and loaded into Matlab.  I &lt;br&gt;
have a set of data (in columns) with values and some of &lt;br&gt;
the values are NaN's.  How can I remove these NaN's and &lt;br&gt;
replace them with previous values so as to keep the column &lt;br&gt;
demensions the same?&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Fri, 08 Aug 2008 13:24:01 -0400</pubDate>
      <title>Remove NaN data</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/174003#448123</link>
      <author>John D'Errico</author>
      <description>&quot;RT Trevino&quot; &amp;lt;rosie_cc2000@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g7hg9v$jv6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey all, I have data from excel and loaded into Matlab.  I &lt;br&gt;
&amp;gt; have a set of data (in columns) with values and some of &lt;br&gt;
&amp;gt; the values are NaN's.  How can I remove these NaN's and &lt;br&gt;
&amp;gt; replace them with previous values so as to keep the column &lt;br&gt;
&amp;gt; demensions the same?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&lt;br&gt;
inpaint_nans will interpolate the nan elements,&lt;br&gt;
based on the previous and forward values.&lt;br&gt;
Use it on one column at a time if the columns&lt;br&gt;
are independent of each other. It also works&lt;br&gt;
in 2-dimensions, if you want it to interpolate&lt;br&gt;
in both dimensions.&lt;br&gt;
&lt;br&gt;
Find inpaint_nans on the FEX:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&lt;/a&gt;&lt;br&gt;
objectId=4551&amp;objectType=file&lt;br&gt;
&lt;br&gt;
If you just want to replace the nan elements&lt;br&gt;
with the previous non-nan element, this is&lt;br&gt;
not hard to do with a find, coupled with a&lt;br&gt;
call to isnan.&lt;br&gt;
&lt;br&gt;
HTH,&lt;br&gt;
John</description>
    </item>
  </channel>
</rss>

