Matrix with elements as polynomial

조회 수: 1 (최근 30일)
ASHA RANI
ASHA RANI 2020년 7월 2일
댓글: ASHA RANI 2020년 7월 2일
syms x
X = [x^2-5*x+6, x^2-6*x+8, x.^2-10*x+25, x.^2-14*x+24]
X is a 1* 4 sym type. I want to find roots of each elements of X. Please Help

채택된 답변

madhan ravi
madhan ravi 2020년 7월 2일
ROOTS = cell(numel(X), 1);
for k = 1:numel(X)
ROOTS{k} = roots(sym2poly(X(k)));
end
celldisp(ROOTS)
  댓글 수: 1
ASHA RANI
ASHA RANI 2020년 7월 2일
Thanx sir...its working properly.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by