Matrix with elements as polynomial
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ASHA RANI
am 2 Jul. 2020
Kommentiert: ASHA RANI
am 2 Jul. 2020
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
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 2 Jul. 2020
ROOTS = cell(numel(X), 1);
for k = 1:numel(X)
ROOTS{k} = roots(sym2poly(X(k)));
end
celldisp(ROOTS)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!