ELG1100
Assignment #1
Due Date: January 26 1998
Problem 1:
Create a MATLAB file which computes and plots two cycles of cosq and sinq versus q . Note that two cycles take 2*2 p radians, which is approximately 12 radians.
Problem 2:
Write the following system of equations as AX=B and solve using MATLAB:
Use two different methods: (a) X=A\B
(b) X=inv(A)*B
Can you indicate a practical method to figure out which method is faster?
Problem 3:
Write a MATLAB program to compute and plot ten-term approximations to cosq and sinq for q running from 0 to 2*2p in steps of 2p /50.
Compute and overplot exact expressions for cosq and sinq .
The approximations of cosq and sinq are given by the following series expansions:
Define your own user-written functions for each of the above series.