if male(m,7)==0||male(m,7)==1
if female(f,7)==0||female(f,7)==1
Wfst = 1;
end
if female(f,7)==2||female(f,7)==3||female(f,7)==4
Wfst = 1/2;
end
if female(f,7) == -1
Wfst = 1/2;
end
end
if male(m,7)==2||male(m,7)==3||male(m,7)==4
if female(f,7)==0||female(f,7)==1
Wfst = 0;
end
if female(f,7)==2||female(f,7)==3||female(f,7)==4
Wfst = 1;
end
if female(f,7) == -1
Wfst = 1/2;
end
end
任何人都可以建议一种更短的处理条件分配的方法。我已经发布了我正在处理的实际代码。