Question

xPC-target slower than Simulink in my application?!

Hi everyone, I am running a Simulink model consisting of 3 C-mex S-functions with static linked libraries to an optimization ...

8 years ago | 2 answers | 0

Question

Simulink user defined function: undefined variable or function

Dear all, When using a user defined Matlab function in Simulink, with the following structure: function xdot = fcn(x,u...

9 years ago | 1 answer | 0

Question

Create a DOSloader bootable USB drive for xPC-Target

I wish to use the DOSloader option of xPC-target to boot my computer from USB DOS drive into xPC-target. This consist of 2 steps...

9 years ago | 1 answer | 0

Question

Convert a MEX-function to an S-function

Dear all, I want to implement an opensource nonlinear solver in Simulink such that it is suitable for code-generation (XPC-ta...

9 years ago | 1 answer | 0

Answered

Calling mex function from within Simulink

I am running into a simular problem as described above. I am looking for more specific information on how to construct an S-func...

Calling mex function from within Simulink

I am running into a simular problem as described above. I am looking for more specific information on how to construct an S-func...

9 years ago | 0

Question

Call a MEX function from Simulink

Dear all, I have a .mex64 function that was build from C++ libraries (IPOPT solver) and is able to solve an optimzation probl...

9 years ago | 1 answer | 0

Question

Pre-allocating a function since initialization is slow

Hi guys, Consider this code: clc; clear all; t2=linspace(0,pi,10); f2=cos(t2); tic; cumtrapz(t2,f2); t1=toc...

9 years ago | 1 answer | 0

Answered

Unconstraint optimization: providing good intial guess does not lead to lower calculation times

I can also guess that it might have something to do with the estimator of the gradient. Close to the optimum, the cost function ...

Unconstraint optimization: providing good intial guess does not lead to lower calculation times

I can also guess that it might have something to do with the estimator of the gradient. Close to the optimum, the cost function ...

9 years ago | 0

Question

Unconstraint optimization: providing good intial guess does not lead to lower calculation times

Dear all, I have a simple optimization problem in which I approximate a set of points by a B-spline. This is done by optimizi...

9 years ago | 2 answers | 0

Question

Efficient Row x Collumn multiplication

Hi all, Consider the vectors: A of size; s x 4 B of size; 4 x s Now, I am only interested in the product A(i,:)*B(:,i...

9 years ago | 4 answers | 0

Question

Create a vector with block elements of the same value

For my superfast code (no element wise evaluation of collocation points, but vector-wise) to evaluate Uniform cubic B-splines, I...

9 years ago | 2 answers | 0

Answered

Chap vector to matrix with special structure.

My own answer: dum=hankel(C) M=dum(1:k,1:n-k+1)

Chap vector to matrix with special structure.

My own answer: dum=hankel(C) M=dum(1:k,1:n-k+1)

9 years ago | 0

| accepted

Question

Chap vector to matrix with special structure.

I have a collumn vector consisting of n elemtents (size nx1): P=[P1 ..... Pn]' What I which to do, is transform this into ...

9 years ago | 2 answers | 0

Answered

Optimization: share additional output of cost function with constraint function

I found the answer after some struggeling with passing on the parameters. Here is the solution: [Cost,Nonlincontr]=Objecti...

Optimization: share additional output of cost function with constraint function

I found the answer after some struggeling with passing on the parameters. Here is the solution: [Cost,Nonlincontr]=Objecti...

9 years ago | 0

Question

Optimization: share additional output of cost function with constraint function

I have a well defined optimization problem in which I have a separate cost function and a separate constraint function: Cos...

9 years ago | 2 answers | 0