for r=1:length(raw)
extractedRow=raw(r, : )
if (sum(isnan(raw{r,1})))==1||(sum(isnan(raw{r,2})))==1||(sum(isnan(raw{r,3})))==1||(sum(isnan(raw{r,4})))==1
if errorReview{1}==0;
errorReview=extractedRow;
else
errorReview=vertcat(errorReview,extractedRow);
end
end
end
Basically it takes out all of the nans and puts them into errorReview, however I'm wondering how to copy the valid entries without the nans into a new array.
extractedRow=raw(r, : )
if (sum(isnan(raw{r,1})))==1||(sum(isnan(raw{r,2})))==1||(sum(isnan(raw{r,3})))==1||(sum(isnan(raw{r,4})))==1
if errorReview{1}==0;
errorReview=extractedRow;
else
errorReview=vertcat(errorReview,extractedRow);
end
end
end
Basically it takes out all of the nans and puts them into errorReview, however I'm wondering how to copy the valid entries without the nans into a new array.
Last edited: