load('daneLab4a.txt') daneOrginal = daneLab4a; vectorNan = isnan(daneOrginal(:,1)); rowsNoNan = find(vectorNan == 0); daneNoNan = daneOrginal([rowsNoNan],:); disp('Dane dla: wszystkie szpitale') disp(['dane orginalne rozmiar: rows = ', num2str(size(daneLab4a,1)),' , columns = ',num2str(size(daneLab4a,2))]) disp(['dane bez NaN rozmiar: rows = ', num2str(size(daneNoNan,1)),' , columns = ',num2str(size(daneNoNan,2))]) uniqueIDPacjent = unique(daneNoNan(:,2)); size(uniqueIDPacjent) ;% 3082x1 for iPacjent = 1:length(uniqueIDPacjent) vector = find(daneNoNan(:,2) == uniqueIDPacjent(iPacjent)); indexPacjent = vector(1); vectorindexPacjent(iPacjent) = indexPacjent; end vectorindexPacjent'; daneNoNanNoReplicate = daneNoNan([vectorindexPacjent],:);