0 views

Uploaded by luisrial

Algoritmo para determinar raíces aproximada

- Poles and Zeros of Network Functions
- 5-4_Analyzing_Graphs_of_Polynomial_Functions[1].pdf
- VietasFormulas.pdf
- Alg Puzzles for Practice Swb
- Math 112110
- Add Maths Project Function Sarawak 2013
- wipro1
- Pre Calculus
- MC0074
- Abstarct - Information Maximization Approach for Communication Signal Separation
- Matlab Tutorials
- Confined Hydrogen Atom in Spherical Cavity in n Dimensions
- Alg 1 - Lesson 1.5 - Unit 5.docx
- 1.9 Review
- itsatrap
- A e 04605217226
- lab10
- Activity
- ass 2 in MMW
- ch 3

You are on page 1of 3

'* ------------------------------------------------- *

'* Reference: BASIC Scientific Subroutines, Vol. II *

'* by F.R. Ruckdeschel, BYTE/McGRAWW-HILL, 1981 [1]. *

'* ------------------------------------------------- *

'* Example: Find two complex roots of polynomial: *

'* f(x) = x^5-10x^4+35x^3-50x^2+24x *

'* *

'* SAMPLE RUN: *

'* *

'* Input order of polynomial: 5 *

'* *

'* Input the polynomial coefficients: *

'* *

'* A(0) = ? 0 *

'* A(1) = ? 24 *

'* A(2) = ? -50 *

'* A(3) = ? 35 *

'* A(4) = ? -10 *

'* A(5) = ? 1 *

'* *

'* Convergence factor: 1e-8 *

'* Maximum number of iterations: 20 *

'* *

'* The roots found are: *

'* *

'* X1 = 1 *

'* Y1 = 0 *

'* *

'* X2 = 0 *

'* Y2 = 0 *

'* *

'* The number of iterations was: 15 *

'* *

'*****************************************************

defint i-n

defdbl a-h,o-z

cls

dim A(10),B(10),C(10),D(10)

input " Order of polynomial: ", m

print " Input the polynomial coefficients:"

for i=0 to m

print " A(";i;") = "; : input A(i)

next

input " Convergence factor: ", e

input " Maximum number of iterations: ",n

aa=3.1415926535# : bb=SQR(2#)

print

print " The roots found are:"

print

print " X1 = "; x1

print " Y1 = "; y1

print

print " X2 = "; x2

print " Y2 = "; y2

print

print " The number of iterations was: "; k

print

end

'**************************************************

'* Bairstow complex root subroutine *

'* ---------------------------------------------- *

'* This routine finds the complex conjugate roots *

'* of a polynomial having real coefficients. *

'* ---------------------------------------------- *

'* Reference: Computer Methods for Science and *

'* Engineering by R.L. Lafara. *

'* ---------------------------------------------- *

'* INPUTS: *

'* Polynomial coefficients : A(0) to A(m) *

'* Order of polynomial (>=4) : m *

'* Initial guess : a and b *

'* Convergence factor : e *

'* Maximum number of iterations : n *

'* OUTPUTS: *

'* Two conjugate complex roots : x1,y1 x2,y2 *

'* Number of iterations : k *

'**************************************************

1000 'Normalize the A(i) series

for i=0 to m

C(i)=A(i)/A(m)

next

'Take initial estimates for aa and bb

k=0 : B(m)=1#

'Start iteration sequence

1100 B(m-1)=C(m-1)-aa

for j=2 to m-1

B(m-j)=C(m-j)-aa*B(m+1-j)-bb*B(m+2-j)

next

B(0)=C(0)-bb*B(2)

D(m-1)=-1# : D(m-2)=-B(m-1)+aa

for j=3 to m-1

D(m-j)=-B(m+1-j)-aa*D(m+1-j)-bb*D(m+2-j)

next

D(0)=-bb*D(2)

d2=-B(2)-bb*D(3)

dd=D(1)*d2-D(0)*D(2)

a1=-B(1)*d2+B(0)*D(2) : a1=a1/dd

b1=-D(1)*B(0)+D(0)*B(1) : b1=b1/dd

aa=aa+a1 : bb=bb+b1 : k=k+1

'Test for the number of iterations

if k>=n then goto 1200

'Test for convergence

if ABS(a1)+ABS(b1)>e*e then goto 1100

'Extract roots from quadratic equation

1200 cc=aa*aa-4#*bb

'Test to see if a complex root

if cc>0 then goto 1300

x1=-aa : x2=x1 : y1=SQR(-cc) : y2=-y1

goto 1400

1300 x1=-aa+SQR(cc)

x2=-aa-SQR(cc) : y1=0 : y2=y1

1400 x1=x1/2# : x2=x2/2# : y1=y1/2# : y2=y2/2#

return

- Poles and Zeros of Network FunctionsUploaded byDina Garan
- 5-4_Analyzing_Graphs_of_Polynomial_Functions[1].pdfUploaded byEnas Basheer
- VietasFormulas.pdfUploaded byvishwas gaur
- Alg Puzzles for Practice SwbUploaded byMarcia Cristina R. Angeles-Lopez
- Math 112110Uploaded byradnukespeople
- Add Maths Project Function Sarawak 2013Uploaded byrockafella101
- wipro1Uploaded bysuganya004
- Pre CalculusUploaded bybackbeat_2006
- MC0074Uploaded bysazizulla
- Abstarct - Information Maximization Approach for Communication Signal SeparationUploaded byNikhil Dixit
- Matlab TutorialsUploaded byAli Gh
- Confined Hydrogen Atom in Spherical Cavity in n DimensionsUploaded byMustafa Murshed
- Alg 1 - Lesson 1.5 - Unit 5.docxUploaded byByron Adriano Pullutasig
- 1.9 ReviewUploaded byBradley Singh
- itsatrapUploaded byAnonymous vkzhIcJrG7
- A e 04605217226Uploaded byAnonymous 7VPPkWS8O
- lab10Uploaded bykevin1ting
- ActivityUploaded byswati
- ass 2 in MMWUploaded byMigz Tolentino
- ch 3Uploaded byapi-245312628
- Identitas RamanujamUploaded byJuwanda
- ap calc ch 5-7 pre post testUploaded byapi-314402585
- Source CodesUploaded bymonlee quilala
- Subsidies for a Generic Theory About EquivalencesUploaded bya4agarwal
- Goal Programming 2013Uploaded byPrateek Rao
- Lim PropUploaded byKevinJaniardyTheng
- Script BacalUploaded bystem two
- Chapter_6 (1)Uploaded bykomal singh
- Ex_sheet1 (1)Uploaded byMuhammad Nabeel Numan
- l8Uploaded bynemoneo

- Ground Control to Major Tom........Uploaded byInas Rebronja
- history fair sourcesUploaded byapi-109002720
- Air Flow, Air Systems, Pressure, And Fan PerformanceUploaded bymuddog
- Financial Astrology – Astro Research OrganisationUploaded bysankarjv
- _RM_1509E_GB_WW_1116-18Uploaded bykrittaphak hacheiram
- lo2Uploaded byapi-259829757
- TIA-EIA-568-B.3Uploaded byRicardo Betancourt Maldonado
- Other Auto AppzUploaded byGiapy Phuc Tran
- VLSI System DesignUploaded bybigfatdash
- Third Monthly ExaminationUploaded byNatasha A Bal-ut
- dr Agustin_KH profil.pptxUploaded byBagus Gita Kusuma
- Choi Et Al 2014_EEG FacesUploaded byAndres Zarabanda
- About Axial Clamping Force Monitoring at Power TraUploaded bylearningalot
- Assignment MF0002 - Mergers & Acquisitions - Sikkim Manipal UniversityUploaded bypriyanga_j
- Biopharmaceutical Constants for Carbamazepine Immediate Release Tablets in Simplifying Bioequivalence StudiesUploaded byOscar Eduardo Leon Guido
- 272144VanguardTwinCylinderOHVUploaded byEdward Baxter-bath
- Cryo TherapyUploaded byAdi Irawan
- Group 8Uploaded byMarilya Chandra
- BMW ActiveHybrid 3 Specs SheetUploaded byTK Tan
- A2 Unit 3 Dada & SurrealismUploaded bymarcatkinson
- TIME Drilling Fluid ProductsUploaded bysc2011
- Transplantation of Macroencapsulated Insulin-Producing CellsUploaded byErika Avila
- Sk SinghUploaded bysumantsingh77
- io2_referencemanualUploaded bychristian@msg-group.com
- NSTPUploaded byahppLe07
- Zahay Griffin 2010 Mktg Strategy Metrics Firm PerformanceUploaded byRishabh Agarwal
- 1 classroom learning profileUploaded byapi-425144490
- Bachelor of Hotel Management Courses from Manipal UniversityUploaded bydisosaalbert
- AGARD-R-767Uploaded bySaad Al Hely
- ILD74 DatasheetUploaded byyampire