From: jy on 20 Jul 2010 20:47 hello. i optimized with fmincon some b-splines. control points of b-splines are variations of my optimization after some iterations, the control points chage to NAN. i don't know the reason!! the knots of control points seem to be real and positive. Knots have no problem. I attach part of my object function function [Heatlossrate] = obj_1axis(x) global nDOF q_i q_f nMidCP g_iteration nDegree global Pp2 Vt bulkmodulus Ahp_k Arp_k M_k global maxQL maxSysRel g_tf g_gravity Vpos Vneg tf=g_tf; cp=zeros(nMidCP+4,nDOF); timestep=tf/g_iteration; for i=1:1:nDOF cp(1,i)=q_i(i); cp(2,i)=q_i(i); for j=1:1:nMidCP cp(2+j,i)= x(j+nMidCP*(i-1)); % q_f(i) q_f(i)]'; end cp(nMidCP+3,i)=q_f(i); cp(nMidCP+4,i)=q_f(i); end n_number=4+nMidCP-1; k=nDegree+1; knots=make_knots(n_number,k); knots= knots/knots(1,n_number+k+1)*tf;
From: us on 20 Jul 2010 21:40 "jy " <eule3029(a)naver.com> wrote in message <i25g27$m9b$1(a)fred.mathworks.com>... > hello. > i optimized with fmincon some b-splines. > control points of b-splines are variations of my optimization > after some iterations, the control points chage to NAN. > i don't know the reason!! the knots of control points seem to be real and positive. > Knots have no problem. > > I attach part of my object function > function [Heatlossrate] = obj_1axis(x) > global nDOF q_i q_f nMidCP g_iteration nDegree > global Pp2 Vt bulkmodulus Ahp_k Arp_k M_k > global maxQL maxSysRel g_tf g_gravity Vpos Vneg > > tf=g_tf; > cp=zeros(nMidCP+4,nDOF); > timestep=tf/g_iteration; > for i=1:1:nDOF > cp(1,i)=q_i(i); > cp(2,i)=q_i(i); > for j=1:1:nMidCP > cp(2+j,i)= x(j+nMidCP*(i-1)); % q_f(i) q_f(i)]'; > end > cp(nMidCP+3,i)=q_f(i); > cp(nMidCP+4,i)=q_f(i); > end > n_number=4+nMidCP-1; k=nDegree+1; > knots=make_knots(n_number,k); > knots= knots/knots(1,n_number+k+1)*tf; why do you stupidly repeat your OP after ~5 minutes(?)... us
|
Pages: 1 Prev: Error when using xlswrite Next: How to use ColorOrder for a added plot line? |