repeated numbers in roots

4 Ansichten (letzte 30 Tage)
Ali
Ali am 8 Jun. 2020
Kommentiert: KSSV am 8 Jun. 2020
Hi
can anybody tell how to remove repeated number in roots of polynomial eqaution.
w =
0.2278
0.2278
1.0382
1.0382
1.5292
1.5292
0.1738
0.1738
0.3461
0.3461
0.5647
0.5647
0.8437
0.8437
0.9098
0.9098
1.0873
1.0873
1.2007
1.2007

Antworten (1)

KSSV
KSSV am 8 Jun. 2020
iwant = unique(w)
  2 Kommentare
Ali
Ali am 8 Jun. 2020
To find roots of w is
w=roots(w);
r-roots(w);
which is one better and accurate way??
KSSV
KSSV am 8 Jun. 2020
Use roots. See to it that the coefficients of the polynomials are arranged as required for the function.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by