A Maclaurin series for the exponential function e* is given by: x' x2 x3 x* = 1+ 2! 3! 4! Using OCTAVE/MATLAB, Write a function to calculate the factorial of a positive integer. You are NOT allowed to...


A Maclaurin series for the exponential function e* is given by:<br>x' x2 x3 x*<br>= 1+<br>2!<br>3! 4!<br>Using OCTAVE/MATLAB,<br>Write a function to calculate the factorial of a positive integer. You are NOT allowed to use<br>the in-built MATLAB function 'factorial' for this question. Name your function 'assignment'.<br>i)<br>ii)<br>Using the given equation, calculate the approximate solution for x = 1 by looping from n =<br>1 to n = 20. Apply the function created in i) for the calculation of factorials.<br>i)<br>Repeat ii) for x = 2, 3, 4, 5 and 6. Store all your answers, including your answer in ii) inside a<br>single array. Hence, plot a graph of e* against x using a blue line and blue circle markers.<br>Label the x-axis as 'x', the y-axis as 'e*i --<br>

Extracted text: A Maclaurin series for the exponential function e* is given by: x' x2 x3 x* = 1+ 2! 3! 4! Using OCTAVE/MATLAB, Write a function to calculate the factorial of a positive integer. You are NOT allowed to use the in-built MATLAB function 'factorial' for this question. Name your function 'assignment'. i) ii) Using the given equation, calculate the approximate solution for x = 1 by looping from n = 1 to n = 20. Apply the function created in i) for the calculation of factorials. i) Repeat ii) for x = 2, 3, 4, 5 and 6. Store all your answers, including your answer in ii) inside a single array. Hence, plot a graph of e* against x using a blue line and blue circle markers. Label the x-axis as 'x', the y-axis as 'e*i --

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here