Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran Programming... Help Please!!!!!

Status
Not open for further replies.

qwerty9143

Technical User
Oct 8, 2014
4
US
Given two polynomials:
F1(x) = c1xn + c2xn-1 + ... + cnx + cn+1

F2(x) = β1xm + β2xm-1 + ... + βmx + βm+1


Write a fortran subroutine /function to add them, that is, F(x)= F1(x) + F2(x), when, n=m, n>m and n<m. Polynomials are added by adding the coefficients of the terms with the same exponent. Assume that the inputs to the subroutine/function are the vectors c=[c1 c2...cn cn+1] and β=[β1 β2...βm βm+1].

Check your script with the following data sets:
a) c = [43, 54, 55] and β = [77, 66, 88, 44, 33]
b) c = [11, 12, 13, 14] and β = [101, 102]; and
c) c = [1, 2, 3, 4] and β = [10, 20, 30, 40]
 
What have you done so far and what are you stuck at?
 
I had my TA for this class try to break it down, but it just wasn't helping any of the class. I was hoping I'd find someone that can help me complete the assignment especially considering there is no office hours the remaining of the week.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top