Image of a Matrix Valued Function

Hi,
 
Is it possible to pass multiple matrices to a function? along with certain constraints? In short how to deal with matrix valued function along with constraints ( e.g. an inequality containing matrices)?
A*X-B =C;
Where A, X, B and C are matrices.
Can you please also elaborate in this case what to pass f.eval_matrix() function?
if the function is of the form: Function f (A,B,C,X, Return(A*X-B))
NumConstraint(A,B,C,X, A*X-B =C)
 
Thanks,

Usman,

All eval_XXX functions expects a single box in argument that represents all the arguments (scalars, vectors, matrices) stored in a single flat array.

To build this vector, the best is to use backward projection functions. Here is an example with f(A,B,C)=A+B-C:

Function pA(A,B,C,A);

Function pB(A,B,C,B);

Function pC(A,B,C,C);

Function f(A,B,C,A+B-C);

Then:

IntervalMatrix MA=...;
IntervalMatrix MB=...;
IntervalMatrix MC=...;

IntervalVector box(3*n*m);  // where n and m is resp. the number of rows/columns

pA.backward(MA,box);       // load MA into box

pB.backward(MB,box);

pC.backward(MC,box);

M = f.eval_matrix(box);

Sincerly,

Gilles

Hi,
I tried following but it throws me an error: Segmentation fault (core dumped)
 

Variable a,b,c;

Function pA(a,b,c,a);

Function pB(a,b,c,b);

Function pC(a,b,c,c);

Function f(a,b,c, (a+b-c));

double _A[2*2][2]={{2,2},{-1,-1},{-1,-1},{2,2}};
IntervalMatrix MA(2,2,_A);

double _B[2*2][2]={{1,1},{-1,-1},{1,1},{1,1}};
IntervalMatrix MB(2,2,_B);

double _C[2*2][2]={{1,1},{0,0},{0,0},{1,1}};
IntervalMatrix MC(2,2,_C);

IntervalVector box(3*2*2);

pA.backward(MA,box);

pB.backward(MB,box);

pC.backward(MC,box);

IntervalMatrix M = f.eval_matrix(box);

 
What can be the reason?
Thanks,

 

 

It's because you did not specify the row/column dimension of the variables.

I have update the documentation and inserted the (correct) code for this example here:

http://www.ibex-lib.org/doc/modeling.html#evaluation-forward-computation

Best regards

Gilles

 

Dr. Gilles,
 
It still throws an error, of segmantation fault (core dumped), even the running example that you mentioned throws the same error. It has anything to do with the version of ibex?
 
Thank,

It should not throw a seg fault. Maybe, try to upgrade to the last release of Ibex.

Gilles