MATLAB Answers

0

Script for deleting extra rows

Asked by Ayman Fatima on 2 Oct 2019
Latest activity Answered by CAM
on 2 Oct 2019
Hi,
I am an oceanographer ,so I have to deal with large data gaps . My problem was that I need a script or a function that deletes extra rows(present due to missing data ) from my data set plus it would be a lot easier if I could have something that would would delete specific rows that are not equivalent to my given time stamp .. I have Matlab 2013a..
Thank you!

  0 Comments

Sign in to comment.

1 Answer

Answer by CAM
on 2 Oct 2019
 Accepted Answer

Try this to remove rows with blank Depths:
[~,~,dataIn] = xlsread(fileName, worksheetName);
index = ~cellfun(@isempty, dataIn(:,2)); % The Depth column
dataCleaned = dataIn(index, :);
I am not clear on the second part of your question. Do you mean you have a defined set of time stamps, and you want to see if you can find matches in the incoming data?

  0 Comments

Sign in to comment.