1
0
Fork 0
mirror of https://github.com/MillironX/beefblup.git synced 2024-12-22 09:08:16 +00:00

Fixed lookup for animal id

This commit is contained in:
Thomas A. Christensen II 2018-09-19 09:41:07 -06:00
parent a87417aedd
commit 0da8dc6e7a

View file

@ -28,8 +28,8 @@ data = sortrows(data,2);
% Create a lookup lambda function to find the animal represented by a
% certain id
ids = data(:,1);
animalrow = @(id) find(ids == id);
animalrow = @(id) find(strcmp(data(:,1), id));
ids = [data{:,1}];
numanimals = length(ids);
% Store column numbers that need to be deleted
@ -114,4 +114,7 @@ for i = 1:length(normal)
X(matchedindex, I) = 1;
I = I + 1;
end
end
end
% Create an empty matrix for the additive relationship matrix
A = sparse(numanimals, numanimals);