필터 지우기
필터 지우기

How do I create a matrix of symbolic function elements and also able to access the element in the matrix using row and column index?

조회 수: 4 (최근 30일)
I'd like to conduct matrix operation to symbolic functions. For instance, a row vector of symbolic functions times a column symbolic functions is the sum of product of symbolic functions. Also, I'd like yo access any element in this matrix and gets the corresponding symbolic element, how can I do this?

채택된 답변

Walter Roberson
Walter Roberson 2016년 2월 27일
You will probably need to feval(symengine) to do this, so that you can slip into a programming language (MuPAD) which has a syntax that distinguishes between indexing and function evaluation.
Or you could compromise a little and invoke the functions to get symbolic expressions that can be multiplied, then symfun() the expressions back into symbolic functions. The results would differ if the functions have side effects, and you would lose the ability to use feval(symengine, 'op', ...) to probe the structure of the component expression.
  댓글 수: 3
Shawn Miller
Shawn Miller 2016년 2월 28일
Seems I can use index to access the elements in a matrix of symbolic expressions.
Walter Roberson
Walter Roberson 2016년 2월 28일
Yup. Algebraic matrix multiplication "*" works fine on arrays of symbolic expressions, and you can index the array without difficulty.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by