the output should like this
I 2. The function sin x can be written as Taylor's series by: sin x = 22 (-1)*x2k+1 (2k + 1)! k=0 Write a user defined function that calculates sin(x) by using the Taylor's series. For the function name and arguments use y-Tsin(x,n).The input arguments are the angle x in degrees, and n the number of terms in the series. Use the function to calculate sin(150) using 3 and 7 terms. Nested For loops: 1. Write a program in a script file that creates nxm matrix with elements have the following values. The value of the elements in the first row is the number of the column. The value of element in the first column is the number of row. The rest of the elements are equal to the sum of the element above them and the element to the left. When executed the program asks the user to enter the values of m and
2. >>Tsin(150,3) 0.6523 >>Tsin(150,7) ans Pr ans- enthehet 0.5000
the output should like this
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am