From: Judas Magnus on 25 Apr 2010 00:03 Just want to update what I have this seems to work: count = 0; for k = 1:length(raw) if isnan(raw{k,2}) count = count + 1; end end count count1 = 0; for k = 1:length(raw) if isnan(raw{k,3}) count1 = count1 + 1; end end count1 First one is for the NaN in the 2nd columns and I made another since I couldnt integrate it in the first one, so the 2nd one reads 3rd column for NaN. Now, would I just sum the count and count1 to get the total amount of blank entries in the array? *However, I don't know if this would work so I can Copy these entries in a new array that you display in order to review and verify the errors and then remove these defective entries from the array (for which one field was left blank) by copying only the valid entries to a new array, which is going to be my working database
From: us on 25 Apr 2010 00:09 "Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hqvqop$9no$1(a)fred.mathworks.com>... > [num txt raw] = xlsread('c:\dummy.xls'); %Read the excel file and loads into matlab > > > Just wondering if there was a simple way to accomplish this, > > I have to find the number of entries that have one blank field. > > So I was thinking that hey If I do raw, I see all the num, txt and other information. > > So i type in > > raw > > I get the list from the excel file into matlab, and I see NaN "not a number" > > So I was wondering on how to count those "NaN' and put the entries with "NaN' fields into another array.. > > > I hope someone can help me please ^_^ well... if you would ever take the time to read up on replies to your OPs instead of just mindlessly producing more questions with the same underlying problem, you would eventually(?) find your way into ML... i guess that would require you to start THINKING... and we know that hurts... http://www.mathworks.com/matlabcentral/newsreader/view_thread/280345#738978 us
First
|
Prev
|
Pages: 1 2 Prev: Image Processing of a Black and White Image Next: INTERPOLATION & ELLIPSE FORMATION |