Do a variation on exercise 7.5 on page 177 of the textbook. Do not implement an
ID: 2079629 • Letter: D
Question
Do a variation on exercise 7.5 on page 177 of the textbook. Do not implement an indefinite-length series. Instead, implement a fixed-length series that terminates at the seventh-power term. Test it in the range of -3 < x < +3.
Submit an m-file named: myexp_LastName.m.
Explanation / Answer
format long;
n=1;
x=input('enter');
p=1;
while ((x^n/factorial(n))>10^(-6))
p=p+x^n/factorial(n);
n=n+1;
end
test=exp(x);
disp('series output is'); disp(p);
disp('test output is'); disp(test);
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.