math_Matrix variable

Hi All,
Is there any way to define a math_Matrix variable and then set its parameters (number of rows and columns)?
Thanks for any Helps.

Patrik Mueller's picture

Hi Alex,

you can set the numbers in the constructor.

HTH,

Patrik

Alex's picture

Hi sir,
How?
Regards

Patrik Mueller's picture

Hi,

from the docs:

math_Matrix A(1, 10, 1, 10);
math_Matrix B(1, 10, 1, 10, 0.0);

math_Matrix (const Standard_Integer LowerRow,
const Standard_Integer UpperRow,
const Standard_Integer LowerCol,
const Standard_Integer UpperCol);

math_Matrix (const Standard_Integer LowerRow,
const Standard_Integer UpperRow,
const Standard_Integer LowerCol,
const Standard_Integer UpperCol,
const Standard_Real InitialValue);

HTH,

Patrik

Alex's picture

Hi Patrik,
You dont understand what my problem is.
I want to define math_Matrix A(a,b,c,d) then set a,b,c and d.
Regards,
Alex

Patrik Mueller's picture

Hi Alex,

how about that:

math_matrix result;
math_matrix tempMatrix(a,b,c,d);
result = tempMatrix;

this should give you the possibility using again the same matrix. What would you do with the matrix?

Greets,

Patrik

Alex's picture

Hi Patrik,
Thank you for your response and sorry for late.
"math_matrix result;" makes the following error.

error C2512: 'math_Matrix' : no appropriate default constructor available
Error executing cl.exe.

Regards,
Alex

Patrik Mueller's picture

Hi,

sorry - my mistake. You have to try something different :-((

Regards,

Patrik