www.pudn.com > globalpathplanning.rar > formula4.m, change:2012-03-13,size:616b


%求解公式4 Ihm 
 
function F4=formula4(pointi,m,tempxyz,flag ) %决定选择第几个权重,从0开始 
weightx=[1,-1,0,0,0,0]; 
weighty=[0,0,1,-1,0,0]; 
weightz=[0,0,0,0,1,-1]; 
H=[0,1,0,1,0,6]; 
    switch flag 
        case 0 
            F4=(pointi.x+tempxyz)*weightx(m)+pointi.y*weighty(m)+pointi.z*weightz(m)+H(m); 
            return; 
        case 1 
            F4=pointi.x*weightx(m)+(pointi.y+tempxyz)*weighty(m)+pointi.z*weightz(m)+H(m); 
           return; 
        case 2 
            F4=pointi.x*weightx(m)+pointi.y*weighty(m)+(pointi.z+tempxyz)*weightz(m)+H(m); 
            return; 
    end