mirror of
https://github.com/MillironX/beefblup.git
synced 2024-11-10 18:23:08 +00:00
Fixed lookup for animal id
This commit is contained in:
parent
a87417aedd
commit
0da8dc6e7a
1 changed files with 6 additions and 3 deletions
|
@ -28,8 +28,8 @@ data = sortrows(data,2);
|
||||||
|
|
||||||
% Create a lookup lambda function to find the animal represented by a
|
% Create a lookup lambda function to find the animal represented by a
|
||||||
% certain id
|
% certain id
|
||||||
ids = data(:,1);
|
animalrow = @(id) find(strcmp(data(:,1), id));
|
||||||
animalrow = @(id) find(ids == id);
|
ids = [data{:,1}];
|
||||||
numanimals = length(ids);
|
numanimals = length(ids);
|
||||||
|
|
||||||
% Store column numbers that need to be deleted
|
% Store column numbers that need to be deleted
|
||||||
|
@ -115,3 +115,6 @@ for i = 1:length(normal)
|
||||||
I = I + 1;
|
I = I + 1;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
% Create an empty matrix for the additive relationship matrix
|
||||||
|
A = sparse(numanimals, numanimals);
|
Loading…
Reference in a new issue