Dear friends,
I am trying to plot a 3D truss structure together with "fmincon" function. I have got an error and couldn't find the problem.
However, the following errors are obtained :
Index exceeds matrix dimensions.Error in Topo_3D/truss (line 164) elnodes = elem(iel, 1:3);Error in Topo_3D/outfun (line 144) truss(x);Error in callAllOptimOutputFcns (line 13) stop(i) = feval(OutputFcn{i},xOutputfcn,optimValues,state,varargin{:});Error in barrierError in fmincon (line 798) [X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...Error in Topo_3D (line 30)[x,fval,ef,output,lambda,hessian] = fmincon(objective,x0,A,b,Aeq,beq,lb,ub,nonlincon,options);
A copy of my fmincon function is attached.
I appreciate if somebody can help with this errors and how can it be solved.
Thank you very much!
RTFQ
Best Answer