Info

This question is closed. Reopen it to edit or answer.

how to optimise a variable in bspline form and optimise it?

1 view (last 30 days)
I have a data set of joint angles, x (2 by n) matrix and a data set of control inputs, U1 (1 by n-m) matrix. I need to convert them into bspline and perform a optimisation with sqp. Below is my code. I gotten an error and could not solve it. Please help me, thank you matlab community.
Here is the error : ??? Error using ==> vertcat The following error occurred converting from double to struct: Error using ==> struct Conversion to struct from double is not possible.
Error in ==> twoD_Model at 53 initial_guess = [x(:); U1(:)];
Here is the code :
x=csapi(x(1,:),x(2,:));
initial_guess = [x(:); U1(:)];
[q2,p2] = size(U1);
[q1,p1] = size(initial_guess);
options = optimset('Algorithm','sqp');
lb=-pi;
ub=pi;
f = @(O)objective(O,m,T,A,a,B1,n,q1,p2,J,E,b); %constriants and dynamic
[O,fval] = fmincon(f,initial_guess,[],[],[],[],lb,ub,@confun,options);
%motion optimization

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!