matlab求距一个数最近的奇(偶)数时间:2021-11-04 15:11:40int_a = floor(a);minEven = int_a+mod(int_a,2); %最近偶数minOdd = int_a+1-mod(int_a,2); %最近奇数