문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top