lambda = ccl_learna_retlambda(q,L) Return a function handle for lambda Input: q Joint state L Link length varargin Output: lambda function handle for lambda
0001 function lambda = ccl_learna_retlambda(q,L,varargin) 0002 % lambda = ccl_learna_retlambda(q,L) 0003 % Return a function handle for lambda 0004 % Input: 0005 % q Joint state 0006 % L Link length 0007 % varargin 0008 % Output: 0009 % lambda function handle for lambda 0010 if nargin == 2 0011 a = 2; 0012 forward_xy = ccl_rob_forward(q,L); 0013 lambda = [2*a*forward_xy(1),-1]; 0014 else 0015 forward_xy = ccl_rob_forward(q,L); 0016 lambda = [2*randi([-10,10])*forward_xy(1),-1]; 0017 end 0018 end