Pregunta

I have two matrices in maple described by:

matrix1 := matrix([matrixData]) and matrix2 :=  matrix([matrixDataChanged])

Both matrices have the same number of rows and columns, I would like to interpolate the elements in matrix1 to the elements of matrix2 as a function of time and store the intermittent results in a variable but I am not sure how to do this.

¿Fue útil?

Solución

If you are using the older matrix constructor, then you can use "evalm" to evaluate expressions.

For example:

> A := matrix([[1,2],[3,4]]);
> B := matrix([[10,20],[30,4]]);
> t := 0.25;
> evalm(A*t + B*(1-t));
                                   [7.75     15.50]
                                   [              ]
                                   [23.25    4.00 ]

The newer Matrix form should just evaluate.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top