필터 지우기
필터 지우기

Same elements in cells on diag of a matrix

조회 수: 2 (최근 30일)
Ohad Shapira
Ohad Shapira 2021년 1월 9일
답변: SaiDileep Kola 2021년 1월 13일
Hello there,
I'm using syms and I have several polynoms in each of my mtrix cells,
I want to find out what are the common elements on the polynoms that on the diagonal of the matrix.
For example, the following 2x2 matrix:
A=[
1+w+w^2, 2w+3;
3w+5, 1-w+w^2;
]
I want to get the following polinom: 1+w^2.
In future steps I'll use cos and sin so please consider it.

답변 (1개)

SaiDileep Kola
SaiDileep Kola 2021년 1월 13일
Hi,
Although there is no direct way I could see for the task, it can be achieved through a little tedious process by extracting children of each polynomial using "children" function and then check for the common factors using "isAlways" as used here.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by