[10 points] QUESTION 2.73 Use MATLAB to carry out the following multiplication o
ID: 3776635 • Letter: #
Question
[10 points] QUESTION 2.73 Use MATLAB to carry out the following multiplication of polynomials x(x-1.7)(x+0.5)(x -0.7) (x 1.5) QUESTION 2.74 USING MAT LAB CODE The reciprocal Fibonacci constant v is defined by the infinite sum: where F. are the Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, Each element in this sequence of numbers is the sum of the previous two. Start by setting the first two elements equal to 1, then F F -1 F Write a MATLAB pro- gram in a script file that calculates y for a given n. Execute the program for n 10, 50, and 100Explanation / Answer
2.74)
n=10,50 and 100
n=input(,enter the value of n ');
y(1)=1;y(2)=1
s=0
for i=3:n
y(i)=y(i-2)+y(i-1)
end
for i=1:n
s=s+1/y(i);
end
fprintf('the fibonacci constant for n=%i is %i ',n,s)
The MATLAB output is,
Enter the value of n 10
The Fibonacci cnstant for n=10 is 3.3305
Enter the value of n 50
The Fibonacci constant for n = 50 is 3.3598
Enter the value of n 100
The Fibonacci constant for n=100 is 3.3598
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.