Prev: Import multiple figures to Excel using VBA
Next: simulink model and processor model integration
From: us on 16 Jul 2010 15:37 "Natalie Sin Hwee " <sin.ng09(a)imperial.ac.uk> wrote in message <i1pqh4$pmj$1(a)fred.mathworks.com>... > Dear Mathworks users ^^ > > I have a matrix of 800x2 > 1 NaN > 1 NaN > 1 NaN > 1 NaN > 1 97 > 1 47 > 1 NaN > 1 NaN > 2 NaN > 2 NaN > 2 NaN > 2 13 > 2 97 > 2 47 > 2 NaN > 2 NaN > > > ..... continued > > > I want to : > > if row contains NAN, remove row completely so i end up with : > 1 97 > 1 47 > 2 13 > 2 97 > 2 47 > > What function can i use? I've tried to 'find' the Nan's but it appears blank: > [r,c,v]=find(x==nan) > > Thanks you! > > Kind regards, > Natalie ^^ one of the many solutions m=[ % <- your data... ]; m=m(~isnan(m(:,2)),:) %{ % m = 1 97 1 47 2 13 2 97 2 47 %} us
|
Pages: 1 Prev: Import multiple figures to Excel using VBA Next: simulink model and processor model integration |