Page 1 of 1

Question 625 pto Create a script file cone toote pict of core function using exact coso function, then using first three

Posted: Sat May 14, 2022 8:19 pm
by answerhappygod
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 1
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 1 (30.83 KiB) Viewed 53 times
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 2
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 2 (44.46 KiB) Viewed 53 times
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 3
Question 625 Pto Create A Script File Cone Toote Pict Of Core Function Using Exact Coso Function Then Using First Three 3 (44.46 KiB) Viewed 53 times
Question 625 pto Create a script file cone toote pict of core function using exact coso function, then using first three fours and terms of the contine series CORE 1- First using colon operator create a vector that does the range of anges between OSX52, Sayat every 10 de interval The act confunction is an and Y3=1 the three tem coins for the plot command to plot the five cosinecuves mentioned in the second line above Use the command hold on between the plot commands so that a plot command doesn't Overwrite the previous plot. Inside the plot commande for plotting the exact cos Similarly use for three for fourt row for stem, and forces command to set it and y-sits to 2 and 2 pecively. Also use label function to have - belasand and function to have y-tabelasUse legend function with a 4 terms 6 terms and term respectively as the command to give Cosine Series Approx' as the plottide you will note that sounds for the approximate series to behave the accone fonction For your convenience three term cosine series will be coded Y_3 - 1 - X.-2/actorial(2) + X./factorial (4) You must include script and the plot that should look more shown below

Question 6 (25 pts) Create a script file 'cosine' to create a plot of cosine function using exact cos function, then using first three, four, six, and ten terms of the cosine series x x x x12 COSX1- ZI48 101 121 First using colon operator create a vector X that stores the range of angles between OSIS 2x say at every 10 deg interval. The exact cosine function is Y exact = cos(x). and Y_3=1- is the three-term cosine series, for example. Then use plot command to plot the five cosine curves mentioned in the second line above. Use the command hold on' between the plot commands so that a plot command doesn't overwrite the previous plot. Inside the plot commands, use -.', 'Linewidth", 3 for plotting the exact cos). Similarly use 'mo--' for three-term 'bo--' for four-term *10-- for six-term, and go--for ten-term cosine series respectively. Use axis command to set x - axis and y-axis limits to 0 - 2 and 2 to 2 respectively. Also use xlabel function to have x-axis label as X. radians' and ylabel function to have y-axts label as 'cos(x)". Use legend function with arguments as "Exact', '3 terms, 4 terms', '6 terms', and '10 terms respectively. Lastly, use the title command to give "Cosine Series Approx' as the plot title. You will note that it takes around 10 terms for the approximate series to behave like the exact cosine function. For your convenience three term cosine series will be coded like Y3 - 1 - X.-2/factorial (2) + X.-4/factorial (4) ; You must include script and the plot that should look similar to one shown below. Cosine Series Approx 15 COS a 05 500- dans