I am trying to make objective function in MATLAB and trying to write this equation in MATLAB but donot know how write and make function.
I tried this so far. not sure if its correct or not
function d = Shortestdistance( x,y,t )
d=sqrt((x(t+1)-x(t))^2-(y(t+1)-y(t))^2);
end
function theta(x,y)= Pathsmoothness (i,N,x,y)
theta(i,i+1) =atan((yi+1)-(yi))/((xi+1)-(xi));
theta2(i,N+1) =atan(((yN+1)-(yi))/((xN+1)-xi));
end
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/449414-need-help-in-writing-this-equation-in-matlab#comment_679741
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/449414-need-help-in-writing-this-equation-in-matlab#comment_679741
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/449414-need-help-in-writing-this-equation-in-matlab#comment_682246
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/449414-need-help-in-writing-this-equation-in-matlab#comment_682246
サインインしてコメントする。